Closed Bug 1546305 Opened 8 months ago Closed 8 months ago

LSNG: Add temporary support for downgrading

Categories

(Core :: Storage: localStorage & sessionStorage, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: janv, Assigned: janv)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There are several changes planned which will need to bump database major schema version. Although we have support for profile per channel, a backward incompatible change would be still painful in some situations like using a previous Nightly and then going back to latest one.

Normally, downgrades are hard to implement, but we implemented database shadowing to support seamless switching between old and new local storage implementation, so we can just remove all new databases, including the local storage archive and start from scratch by copying webappsstore.sqlite to storage/ls-archive.sqlite.
New local storage databases will be migrated lazily again using schema current for given build.

This would work until we disable database shadowing. Database shadowing will be disabled once we are confident about new local storage and when all planned major schema changes are done.

At the same time we can also support local storage archive upgrades which can be used for forcing database re-creation, to really fix bug 1542104. data.sqlite for slack.com can still contain invalid usage in the database table (usage column) and the usage file can also be invalid.

We need this ASAP, some people don't upgrade Nightly for several days. We might want to uplift this to beta as well.

Assignee: nobody → jvarga
Blocks: 1540402
Status: NEW → ASSIGNED
Priority: -- → P1
Blocks: 1546310
Blocks: 1546561
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/da2a8881bec1
LSNG: Add temporary support for downgrading; r=asuth
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Pascal, is there is chance this would be approved for beta ?
LSNG will be disabled by default in 67, but some users can enable it manually and in that case, if they switch between release/beta/nightly using same profile, they would get broken local storage in 67 without this patch.

Flags: needinfo?(pascalc)

(In reply to Jan Varga [:janv] from comment #5)

Pascal, is there is chance this would be approved for beta ?
LSNG will be disabled by default in 67, but some users can enable it manually and in that case, if they switch between release/beta/nightly using same profile, they would get broken local storage in 67 without this patch.

We have dedidated profiles per install starting with 67 so this scenario would be for a very small subset of people that force the use of the same profile for all their installs and also manually activated LSNG, given the size of the patch I don't think that it is a good candidate for uplift, sorry.

Flags: needinfo?(pascalc)

Ok.

You need to log in before you can comment on or make changes to this bug.