Open Bug 1919530 Opened 1 year ago Updated 1 year ago

Switch to skv instead of rkv for kvstore usage in the extensions framework

Categories

(WebExtensions :: General, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

(Depends on 3 open bugs, Blocks 1 open bug)

Details

skv is the successor of rkv (bug 1909407) as the backend for the kvstore API.

We currently have 4 possible rkv databases in extension code:

Although the documentation states that the directory can be reused by databases, this turned out to be not possible because of race conditions (bug 1807010). According to Lina, the issue is no longer present in skv, and it is possible and even encouraged to use the same directory where possible.

Since we have some freedom in choosing the database location for the new skv files, we may as well choose one single location, e.g. extension-store/ and delete the old rkv files and directories upon migration. Transparent data migration is possible through the migrator added in bug 1913826.

For feature parity, skv corruption handling should be implemented before we migrate (bug 1913238).

Note that I am already starting to use skv as the storage backend of the userScripts API (bug 1911833).

Depends on: 1913238
See Also: → 1911833
Depends on: 1919618
Depends on: 1919655

As part of migrating to skv, we can also use the more efficient deleteRange method instead of the current practice of querying all keys before deletion. This is implemented for skv only at bug 1919674. This is a nice-to-have.

At https://searchfox.org/mozilla-central/rev/56fd3b43187bca036141c384b809e61d51a447de/toolkit/components/extensions/ExtensionScriptingStore.sys.mjs#98-100

Depends on: 1919674
Depends on: 1913241
No longer depends on: 1913238
Depends on: 1920270
Severity: -- → N/A
Priority: -- → P3
See Also: → 1943042
You need to log in before you can comment on or make changes to this bug.