`PushDB` won't initialize if there are backward-incompatible changes to the IDB schema
Categories
(Core :: DOM: Push Subscriptions, defect, P3)
Tracking
()
People
(Reporter: lina, Unassigned)
References
Details
(Whiteboard: dom-lws-bugdash-triage)
Updated•10 years ago
|
| Reporter | ||
Updated•9 years ago
|
Updated•7 years ago
|
Updated•3 years ago
|
Comment 3•10 months ago
|
||
There's now a profile mechanism in place to prevent attempting to use a profile from the future, as well as profile-per-channel mechanisms to help avoid accidentally getting into a situation like that, so I am going to resolve this WFM. That said, bug 1759711 can potentially help with this by just automatically deleting the database if we expand the scope of what it means for a database to be corrupt. (And that bug is appropriate an IDB bug, not a push bug; it's not push's problem.)
As Jari pointed out in the triage meeting, we do have some corruption handling when opening databases, but unfortunately it seems that the schema being from the future is not treated as corruption. Specifically, here we try and open the database and our use of QM_OR_ELSE_WARN_IF uses a predicate that treats corrupt databases specially with the fallback returning a null connection which then results in us trying to delete the database file and if that works we go and try and open/create the database again. But it's only after that that we load the schema version and we'll then bail if the schema is from the future.
Description
•