Introduce PersistenceScope class à la OriginScope
Categories
(Core :: Storage: Quota Manager, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox131 | --- | fixed |
People
(Reporter: janv, Assigned: janv)
References
(Blocks 1 open bug)
Details
Attachments
(7 files, 7 obsolete files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Directory locks currently only support specifying a concrete persistence type or all persistence types. There are situations like temporary storage
initialization when multiple persistence types need to be specified. It would be possible to create multiple directory locks for that, but that would also introduce non-trivial additional complexity. A new PersistenceScope class in the style of OriginScope will make it easy to specify multiple persistence types.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Cached origin usage can be currently obtained by passing fromMemory=true to
nsIQuotaManagerService::GetUsageForPrincipal. However, supporting both ways of
getting origin on one operation is not ideal for sevaral reasons. The return
value is a plain integer in the case of cached origin usage and getting cached
origin usage in theory doesn't have to go the QM IO thread. So it would be
better to have a dedicated method for that.
Depends on D194542
| Assignee | ||
Comment 2•1 year ago
|
||
There's now a dedicated nsIQuotaManagerService::GetCachedUsageForPrincipal
method for getting cached origin usage. All callers of
nsIQuotaManagerService::GetUsageForPrincipal which want to get cached origin
usage for given principal can be now converted to call the new method.
Depends on D195360
| Assignee | ||
Comment 3•1 year ago
|
||
Depends on D195363
| Assignee | ||
Comment 4•1 year ago
|
||
Directory locks currently only support specifying a concrete persistence type
or all persistence types. There are situations like temporary storage
initialization when multiple persistence types need to be specified. It would
be possible to create multiple directory locks for that, but that would also
introduce non-trivial additional complexity. A new PersistenceScope class in
the style of OriginScope will makes it easy to specify multiple persistence
types. Support for actual persistence type sets will be added in a separate
patch, this patch just adds basic functionality.
Depends on D195365
| Assignee | ||
Comment 5•1 year ago
|
||
Nullable<PersistenceType> only allows to specify a concrete persistence type or
all persistence types while PersistenceScope is intended to allow specification
of multiple persistence types as well. Support for that will be added in a
separate patch. This patch is about using the new type especially in directory
locks.
Depends on D195366
| Assignee | ||
Comment 6•1 year ago
|
||
Temporary storage initialization can finally lock only specific repositories
instead of locking all repositories (actual temporary storage initialization
locking chagnes will be done in a separate patch).
Depends on D195373
| Assignee | ||
Comment 7•1 year ago
|
||
Temporary storage initialization currently uses a directory lock over all
repositories which blocks any exclusive directory locks for the persistent
repository for now reason.
Depends on D195374
| Assignee | ||
Comment 8•1 year ago
|
||
QuotaManager::OpenClientDirectory can now detect the requested persistence type
and initializa temporary storage if it's needed.
Depends on D195389
| Assignee | ||
Comment 9•1 year ago
|
||
QuotaManager::OpenClientDirectory already makes sure that temporary storage
is initialized so all these calls are now redundant.
Depends on D195390
| Assignee | ||
Comment 10•1 year ago
|
||
QuotaManager::OpenStorageDirectory can now detect the requested persistence
scope and initialize temporary storage if it's needed.
Depends on D195391
Updated•1 year ago
|
| Assignee | ||
Comment 11•1 year ago
|
||
QuotaManager::OpenStorageDirectory already makes sure that temporary storage
is initialized so all these calls are now redundant.
Depends on D195393
| Assignee | ||
Comment 12•1 year ago
|
||
The goal to call QuotaManager::EnsureTemporaryStorageIsInitializedInternal only
from InitTemporaryStorageOp has been achieved. It's now easy to change the
method to be a private method.
Depends on D195395
| Assignee | ||
Comment 13•1 year ago
|
||
TestQuotaManager.cpp is getting big and the use of the Await helper reduces the
size of the file significantly and also make the tests more readable.
Depends on D195396
| Assignee | ||
Comment 14•1 year ago
|
||
These additional tests are mainly to improve code coverage of
QuotaManager::InitializeTemporaryStorage method.
Depends on D195399
| Assignee | ||
Updated•1 year ago
|
Comment 15•1 year ago
|
||
Comment 16•1 year ago
|
||
| bugherder | ||
Comment 17•1 year ago
|
||
Comment 18•1 year ago
|
||
| bugherder | ||
Comment 19•1 year ago
|
||
Comment 20•1 year ago
|
||
| bugherder | ||
Comment 21•1 year ago
|
||
Comment 22•1 year ago
|
||
| bugherder | ||
Comment 23•1 year ago
|
||
Comment 24•1 year ago
|
||
| bugherder | ||
Comment 25•1 year ago
|
||
Comment 26•1 year ago
|
||
Backed out for causing mochitest failures @ test_cache_orphaned_body.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/2507f6a9f003677d3d1802e1994f1dba8ffff3a0
| Assignee | ||
Updated•1 year ago
|
Comment 27•1 year ago
|
||
Comment on attachment 9366768 [details]
Bug 1866217 - Add support for initializing temporary storage to QuotaManager::OpenClientDirectory; r=#dom-storage
Revision D195390 was moved to bug 1913561. Setting attachment 9366768 [details] to obsolete.
Comment 28•1 year ago
|
||
Comment on attachment 9366769 [details]
Bug 1866217 - Remove QuotaManager::EnsureTemporaryStorageIsInitializedInternal calls from places where a directory lock is obtained via QuotaManager::OpenClientDirectory; r=#dom-storage
Revision D195391 was moved to bug 1913561. Setting attachment 9366769 [details] to obsolete.
Comment 29•1 year ago
|
||
Comment on attachment 9366771 [details]
Bug 1866217 - Add support for initializing temporary storage to QuotaManager::OpenStorageDirectory; r=#dom-storage
Revision D195393 was moved to bug 1913561. Setting attachment 9366771 [details] to obsolete.
Comment 30•1 year ago
|
||
Comment on attachment 9366777 [details]
Bug 1866217 - Remove QuotaManager::EnsureTemporaryStorageIsInitializedInternal calls from places where a directory lock is obtained via QuotaManager::OpenStorageDirectory; r=#dom-storage
Revision D195395 was moved to bug 1913561. Setting attachment 9366777 [details] to obsolete.
Comment 31•1 year ago
|
||
Comment on attachment 9366782 [details]
Bug 1866217 - Change QuotaManager::EnsureTemporaryStorageIsInitializedInternal to be a private method; r=#dom-storage
Revision D195396 was moved to bug 1913561. Setting attachment 9366782 [details] to obsolete.
Comment 32•1 year ago
|
||
Comment on attachment 9366785 [details]
Bug 1866217 - Update QuotaManager gtests to use Await instead of manual spinning of the event loop; r=#dom-storage
Revision D195399 was moved to bug 1913561. Setting attachment 9366785 [details] to obsolete.
Comment 33•1 year ago
|
||
Comment on attachment 9366787 [details]
Bug 1866217 - Add more tests for QuotaManager::InitializeTemporaryStorage method; r=#dom-storage
Revision D195400 was moved to bug 1913561. Setting attachment 9366787 [details] to obsolete.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Description
•