IDB: Better handling for filesystem errors and broken directories
Categories
(Core :: Storage: IndexedDB, enhancement, P3)
Tracking
()
People
(Reporter: janv, Unassigned)
References
(Depends on 1 open bug)
Details
We need a fallback mechanism for cases when we are not able to remove a file or directory from disk. For example, the telemetry for IDB_GetEntry tells us that there are failures when we try to remove unknown directory in idb/ (or .files directory w/o a sqlite database).
Situations like this could be handled by orphaning such IDB databases (trying to delete it later) and creating a new directory for it, so the database or entire origin can be usable again.
The current layout on disk looks like this:
<profile>/storage/origin1/idb/
db1.files/
db2.files/
db1.sqlite
db2.sqlite
The new layout could look like this:
<profile>/storage2/UUID1/
files/
database.sqlite
<profile>/storage2/UUID2/
files/
database.sqlite
QuotaManager would provide APIs for creating all the mappings. So a directory under storage2/ wouldn't be an origin directory, just a directory.
We probably wouldn't orphan such databases as part of temporary storage initialization, it would be done when the origin and IDB is actually really needed.
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•2 years ago
|
||
Renaming this bug to differentiate from SQLite corruption errors.
Updated•2 years ago
|
Description
•