Closed Bug 1680031 Opened 4 years ago Closed 4 years ago

Abort operations for given directory lock ids

Categories

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

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: janv, Assigned: janv)

References

(Blocks 1 open bug)

Details

Attachments

(10 files)

(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details

Currently, when an origin is being cleared we go through the directory locks which block the clear operation and collect clients which need to be notified with AbortOperations(aOrigin).
However, this aborts all operations for given origin. The clear operation can now only clear data for given persistence type or client type. So we need to abort operations for given directory locks (instead for given origin), otherwise we can end up aborting operations for storages which are not about to be cleared.
I want to convert OpenDirectory to use MozPromise instead of a custom listener and this bug needs to be done first
Finally, I plan to use MozPromise for the asynchronous initialization methods, so if OpenDirectory uses that too, we can probably chain all that in a nice way.

Client::AbortOperations no longer supports the case when an empty origin string
is passed (which was used to abort all operations).

Depends on D98343

These methods are only used in QuotaClient class, so they don't need to be global.

Depends on D98344

This is just a minor cleanup.

Depends on D98346

Attachment #9190579 - Attachment description: Bug 1680031 - QM: Give id to all directory locks; r=#dom-workers-and-storage-reviewers → Bug 1680031 - QM: Give ids to all directory locks; r=#dom-workers-and-storage-reviewers
Attachment #9190581 - Attachment description: Bug Bug 1680031 - LSNG: Move some global methods to QuotaClient class; r=#dom-workers-and-storage-reviewers → Bug 1680031 - LSNG: Move some global methods to QuotaClient class; r=#dom-workers-and-storage-reviewers
Attachment #9190584 - Attachment description: Bug 1680031 - IDB: Pass aContentParentId by reference in AbortOperationsForProcess; r=#dom-workers-and-storage-reviewers → Bug 1680031 - IDB: Cleanup (and unification with other Client implementations) in QuotaClient class; r=#dom-workers-and-storage-reviewers
Keywords: leave-open
Attachment #9190584 - Attachment description: Bug 1680031 - IDB: Cleanup (and unification with other Client implementations) in QuotaClient class; r=#dom-workers-and-storage-reviewers → Bug 1680031 - IDB: Change argument type of Condition in InvalidateLiveDatabasesMatching to a reference; r=#dom-workers-and-storage-reviewers
Attachment #9190734 - Attachment description: Bug 1680031 - DOMCACHE: Pass manager as a reference in Manager::Factory::AbortMatching; r=#dom-workers-and-storage-reviewers → Bug 1680031 - DOMCACHE: Change argument type of Condition in AbortMatching to a reference; r=#dom-workers-and-storage-reviewers
Attachment #9190735 - Attachment description: Bug 1680031 - SDB: Cleanup (and unification with other Client implementations) in QuotaClient class; r=#dom-workers-and-storage-reviewers → Bug 1680031 - SDB: Change argument type of Condition in AllowToCloseConnectionsMatching to a reference; r=#dom-workers-and-storage-reviewers
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3f0236595b7 QM: Give ids to all directory locks; r=dom-workers-and-storage-reviewers,sg https://hg.mozilla.org/integration/autoland/rev/57ec107c7fa0 Introduce Client::AbortAllOperations; r=dom-workers-and-storage-reviewers,sg https://hg.mozilla.org/integration/autoland/rev/78f865f179f6 IDB: Change argument type of Condition in InvalidateLiveDatabasesMatching to a reference; r=dom-workers-and-storage-reviewers,sg https://hg.mozilla.org/integration/autoland/rev/8beb762b9dae DOMCACHE: Change argument type of Condition in AbortMatching to a reference; r=dom-workers-and-storage-reviewers,sg https://hg.mozilla.org/integration/autoland/rev/1e466374bc50 SDB: Change argument type of Condition in AllowToCloseConnectionsMatching to a reference; r=dom-workers-and-storage-reviewers,sg
Attachment #9190582 - Attachment description: Bug 1680031 - LSNG: Cleanup (and unification with other Client implementations) in QuotaClient class; r=#dom-workers-and-storage-reviewers → Bug 1680031 - LSNG: Various cleanup related to abort operations methods; r=#dom-workers-and-storage-reviewers
Attachment #9190583 - Attachment description: Bug 1680031 - IDB: Move private static methods of QuotaCLient to a uniform place; r=#dom-workers-and-storage-reviewers → Bug 1680031 - IDB: Change InvalidateLiveDatabasesMatching to a free function; r=#dom-workers-and-storage-reviewers
Attachment #9190581 - Attachment description: Bug 1680031 - LSNG: Move some global methods to QuotaClient class; r=#dom-workers-and-storage-reviewers → Bug 1680031 - LSNG: Change InvalidatePrepareDatastoreOpsMatching and InvalidatePreparedDatastoresMatching to free functions; r=#dom-workers-and-storage-reviewers
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bad84766f83c LSNG: Various cleanup related to abort operations methods; r=dom-workers-and-storage-reviewers,sg https://hg.mozilla.org/integration/autoland/rev/10736db2685a IDB: Change InvalidateLiveDatabasesMatching to a free function; r=dom-workers-and-storage-reviewers,sg https://hg.mozilla.org/integration/autoland/rev/de20363fdc0f SDB: Change AllowToCloseConnectionsMatching to a free function; r=dom-workers-and-storage-reviewers,sg https://hg.mozilla.org/integration/autoland/rev/c7e3c04eb74e LSNG: Change InvalidatePrepareDatastoreOpsMatching and InvalidatePreparedDatastoresMatching to free functions; r=dom-workers-and-storage-reviewers,sg

This patch changes the way how we abort operations when clearing of data is
requested. Instead of aborting all operations for given origin, we now abort
all operations for given directory locks which are blocking clearing of data.

Depends on D98345

Keywords: leave-open

The core patch has not yet landed, so reopening.

I want to convert OpenDirectory to use MozPromise instead of a custom listener and this bug needs to be done first
Finally, I plan to use MozPromise for the asynchronous initialization methods, so if OpenDirectory uses that too, we can probably chain all that in a nice way.

This is not yet done. It's not clear to me if you want to do this within this bug, or in separate bugs? In the former case, we probably still need leave-open here.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Yes, I prematurely removed the leave-open flag, sorry.

Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0a8dbaa4c1bd Abort operations for given directory lock ids; r=dom-workers-and-storage-reviewers,sg
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: