Cover temporary storage initialization in OpenStorageDirectory and OpenClientDirectory
Categories
(Core :: Storage: Quota Manager, task, P1)
Tracking
()
People
(Reporter: janv, Assigned: janv)
References
(Depends on 2 open bugs, Blocks 2 open bugs)
Details
Attachments
(14 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 | |
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 |
Quota clients and origin operations currently still have to call EnsureTemporaryStorageIsInitializedInternal
method
on the QM IO thread. This should be covered by OpenStorageDirectory
and OpenClientDirectory
instead.
Assignee | ||
Updated•7 months ago
|
Assignee | ||
Comment 1•7 months 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•7 months 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•7 months ago
|
||
Depends on D195363
Assignee | ||
Comment 4•7 months 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•7 months 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•7 months 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•7 months 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•7 months ago
|
||
QuotaManager::OpenClientDirectory can now detect the requested persistence type
and initializa temporary storage if it's needed.
Depends on D195389
Assignee | ||
Comment 9•7 months ago
|
||
QuotaManager::OpenClientDirectory already makes sure that temporary storage
is initialized so all these calls are now redundant.
Depends on D195390
Assignee | ||
Comment 10•7 months ago
|
||
QuotaManager::OpenStorageDirectory can now detect the requested persistence
scope and initialize temporary storage if it's needed.
Depends on D195391
Updated•7 months ago
|
Assignee | ||
Comment 11•7 months ago
|
||
QuotaManager::OpenStorageDirectory already makes sure that temporary storage
is initialized so all these calls are now redundant.
Depends on D195393
Assignee | ||
Comment 12•7 months 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•7 months 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•7 months ago
|
||
These additional tests are mainly to improve code coverage of
QuotaManager::InitializeTemporaryStorage method.
Depends on D195399
Description
•