Closed Bug 1781204 Opened 2 years ago Closed 2 years ago

Asynchronous storage shutdown

Categories

(Core :: Storage: Quota Manager, task, P2)

task

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: janv, Assigned: janv)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

The existing ShutdownStorage method is currently run on the IO thread only. The new asynchronous InitializeStorage method which is being added in bug 1749504 adds some members which can be accessed on the PBackground thread only. We need to reset them during shutdown, so ShutdownStorage needs to properly create an operation which runs on both threads.

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

The existing ShutdownStorage method is currently run on the IO thread only. The new asynchronous InitializeStorage method which is being added in bug 1749504 adds some members which can be accessed on the PBackground thread only. We need to reset them during shutdown, so ShutdownStorage needs to properly create an operation which runs on both threads.

There is (yet) no patch on bug 1749504 that would help to understand the context better? Did you invert the order of patches, adding those members here? Can you please add some more (updated) context on the patches here? Thanks

Flags: needinfo?(jvarga)

A patch for bug 1749504 is coming soon, but I guess the comment in the second patch for this bug should be enough already. Asynchronous storage shutdown makes quota manager shutdown cleaner and it paves a way for future cleanup/improvements besides supporting bug 1749504.

Flags: needinfo?(jvarga)
Attachment #9287059 - Attachment description: Bug 1781204 - Assert that directory lock for ShutdownStorageOp is acquired exclusivly; r=#dom-storage → Bug 1781204 - Assert that directory lock for ShutdownStorageOp is acquired exclusively; r=#dom-storage
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c310be196adb
Rename ShutdownStorage to ShutdownStorageInternal; r=dom-storage-reviewers,jstutte
https://hg.mozilla.org/integration/autoland/rev/3aadb63489df
Implement asynchronous ShutdownStorage; r=dom-storage-reviewers,jstutte
https://hg.mozilla.org/integration/autoland/rev/f433ccad5905
Assert that directory lock for ShutdownStorageOp is acquired exclusively; r=dom-storage-reviewers,jstutte
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: