With this patch, IDB connection pool begins to run transactions and idle maintenance on task queue event targets on top of a thread pool. The underlying thread pool will take over all thread management.
Differential Revision: https://phabricator.services.mozilla.com/D191296
With this patch, IDB connection pool begins to run transactions and idle maintenance on task queue event targets on top of a thread pool. The underlying thread pool will take over all thread management.
Differential Revision: https://phabricator.services.mozilla.com/D191296
Explicitly committed transactions are aborted in case of a failed request. This
is achieved by tracking order of requests. The order of requests is currently
tracked by storing request serial numbers. However, request serial numbers are
not always in sync between parent and child, so they are only suitable for
logging purposes. This patch switches from request serial numbers to request
ids which are only generated by the child side and thus always in sync between
parent and child.
Differential Revision: https://phabricator.services.mozilla.com/D204200
This patch adds only new member variables, actual support for sending ids will
be added in individual patches (all ids are set to zero for now). The idea is
to have only one source of truth, so an id used in the parent and child is
always the same.
Differential Revision: https://phabricator.services.mozilla.com/D204025
In case we did start a DeleteFilesRunnable before shutdown we should ensure it is going to be executed before we leave our QM shutdown barrier, but we can ignore pending but not yet started deletions completely as PBM origins are deleted entirely by other means.
Differential Revision: https://phabricator.services.mozilla.com/D203502
Previously, idle maintenance was interrupted whenever a new runnable was
posted to the executing thread. Here we replace this interrupt signal with
an explicit boolean flag in order to support task queue event targets.
Differential Revision: https://phabricator.services.mozilla.com/D165984
Previously, idle maintenance was interrupted whenever a new runnable was
posted to the executing thread. Here we replace this interrupt signal with
an explicit boolean flag in order to support task queue event targets.
Differential Revision: https://phabricator.services.mozilla.com/D165984
Both methods now run on the PBackground thread, there's no need to have these as
separate methods anymore. The extra state can be now removed as well. This opens
the door for some further optimizations.
Differential Revision: https://phabricator.services.mozilla.com/D189757
FactoryOp::Open now contains no code which can only run on the main thread, so
it can be safely switched to running on the PBackground thread.
Differential Revision: https://phabricator.services.mozilla.com/D189756
InitializeQuotaManager already initializes the storage service on the main
thread, so the initialization in FactoryOp::Open can be just removed.
Differential Revision: https://phabricator.services.mozilla.com/D189755
mLocale is currently initialized in IndexedDatabaseManager::Init which is
called from IndexedDatabaseManager::GetOrCreate if the manager doesn't exist.
This can be a problem when IndexedDatabaseManager::GetOrCreate is called very
early,for example in nsLayoutStatics::Initialize in the parent process.
This is a preparation for moving IndexedDatabaseManager::GetOrCreate from
FactoryOp::Open to InitializeQuotaManager.
Differential Revision: https://phabricator.services.mozilla.com/D189891
FactoryOp::CheckPermission now contains only permission related code and it
always returns PermissionValue::kPermissionAllowed so it can be safely removed.
Differential Revision: https://phabricator.services.mozilla.com/D189754
The reference can be later used to stop already running maintenance (instead of
dispatching a dummy runnable to the connection thread).
Differential Revision: https://phabricator.services.mozilla.com/D201199
The warn only check is supposed to mach the debug only assertion, but it
is actually not in line with the assertion causing a lot of warnings during
test_connection_idle_maintenance.js execution.
Differential Revision: https://phabricator.services.mozilla.com/D200770