Skip to content

Report data loss to script #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
inexorabletash opened this issue Aug 10, 2015 · 2 comments
Closed

Report data loss to script #30

inexorabletash opened this issue Aug 10, 2015 · 2 comments
Labels

Comments

@inexorabletash
Copy link
Member

Imported from https://www.w3.org/Bugs/Public/show_bug.cgi?id=22370

from dgrogan@chromium:

It would be nice to be able to notify script that some data may have been lost due to disk corruption or other failure.

Previous discussion:
http://lists.w3.org/Archives/Public/public-webapps/2013OctDec/0108.html

@inexorabletash
Copy link
Member Author

Chrome has shipped two additional properties:

enum IDBDataLossAmount { "none", "total" };
partial interface IDBVersionChangeEvent {
  readonly attribute IDBDataLossAmount dataLoss;
  readonly attribute DOMString dataLossMessage; 
};

With the speclet: if backing store corruption is detected when a database is opened, the backing store will be deleted and thus the open request will be treated as an initial open/upgrade; dataLoss will be set to "total" indicating that the database was deleted. This allows sites to reconcile out-of-band data (cookies, localStorage).

This isn't great but it works.

Another idea that we thought of is firing an event of some type. Possibly at the connection (IDBDatabase), or the open request (IDBOpenDBRequest), or maybe even at the factory (IDBFactory) when a backing store error is encountered.

@inexorabletash inexorabletash added the storage buckets Handle this with Storage Buckets instead? label Sep 20, 2019
@inexorabletash
Copy link
Member Author

TPAC 2019 Web Apps Indexed DB triage notes:

This is being explored more generically over in:

https://github.com/wanderview/storage-corruption-reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant