Граф коммитов

1210 Коммитов

Автор SHA1 Сообщение Дата
Jan Varga 7d0fd78cda Bug 1722668 - Speed up temporary storage initialization by archiving unaccessed origin directories; r=jari
This patch introduces a new notion of unaccessed origins. An origin is
considered as unaccessed if its age is older than a threshold (controlled by a
new preference, currently set to 13 months). Unaccessed origins are collected
during quota info loading.
When quota info loading is finished we check if it took a long time (controlled
by a new preference, currently set to 21s) and eventually archive unaccessed
origins which should speed up temporary storage initialization in a new
session.
Archiving consits of creating a new directory (archive) under storage/archives/0
directory (the name is based on the current date) and moving unaccessed origin
directories to the archive.
Once the patch lands, we will be monitoring QM_QUOTA_INFO_LOAD_TIME_V0
telemetry (quota info load time) and eventually lower down the preference for
long quota info load time.
If there are no issues, the archiving will be replaced with a hard removal of
unaccessed origins and also of the archives which were created in the meantime.

Differential Revision: https://phabricator.services.mozilla.com/D123049
2021-09-04 21:54:53 +00:00
Jan Varga d78c89f78e Bug 1722668 - Implement a workaround for the case when GetLastModifiedTime returns INT64_MIN; r=jari
Differential Revision: https://phabricator.services.mozilla.com/D123613
2021-09-04 21:54:52 +00:00
Csoregi Natalia 03b44ad93d Backed out 3 changesets (bug 1722668) for failures on test_unsetLastAccessTime.js. CLOSED TREE
Backed out changeset db05822c64ff (bug 1722668)
Backed out changeset c9f100cb3f86 (bug 1722668)
Backed out changeset a7179b67eb1a (bug 1722668)
2021-09-05 00:22:49 +03:00
Jan Varga 127496a5fe Bug 1722668 - Speed up temporary storage initialization by archiving unaccessed origin directories; r=jari
This patch introduces a new notion of unaccessed origins. An origin is
considered as unaccessed if its age is older than a threshold (controlled by a
new preference, currently set to 13 months). Unaccessed origins are collected
during quota info loading.
When quota info loading is finished we check if it took a long time (controlled
by a new preference, currently set to 21s) and eventually archive unaccessed
origins which should speed up temporary storage initialization in a new
session.
Archiving consits of creating a new directory (archive) under storage/archives/0
directory (the name is based on the current date) and moving unaccessed origin
directories to the archive.
Once the patch lands, we will be monitoring QM_QUOTA_INFO_LOAD_TIME_V0
telemetry (quota info load time) and eventually lower down the preference for
long quota info load time.
If there are no issues, the archiving will be replaced with a hard removal of
unaccessed origins and also of the archives which were created in the meantime.

Differential Revision: https://phabricator.services.mozilla.com/D123049
2021-09-04 20:10:13 +00:00
Jan Varga 2f260cc9c0 Bug 1722668 - Implement a workaround for the case when GetLastModifiedTime returns INT64_MIN; r=jari
Differential Revision: https://phabricator.services.mozilla.com/D123613
2021-09-04 20:10:12 +00:00
Andi-Bogdan Postelnicu e9592f0e49 Bug 1725145 - fixes in dom for win in non unified env. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D123544
2021-08-25 10:46:15 +00:00
Kagami Sascha Rosylight 6735c3170f Bug 1723050 - Part 23: Replace typedef by using in dom/quota/ r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D121321
2021-08-16 17:05:42 +00:00
Jan Varga fc6c77e407 Bug 1724377 - QM: Replace nsresult with QMResult in InvalidateCache; r=jari
Differential Revision: https://phabricator.services.mozilla.com/D121947
2021-08-10 13:59:05 +00:00
Jan Varga d017e0a42a Bug 1724897 - QM: Introduce QM_TO_RESULT sub-macro; r=jari
Differential Revision: https://phabricator.services.mozilla.com/D122208
2021-08-10 13:59:05 +00:00
Jan Varga 4ad6f0533e Bug 1724895 - QM: Introduce type alias for Result<Ok, QMResult>; r=jari
This patch introduces a new type alias OkOrErr for Result<Ok, QMResult> and also converts some existing occurencies of Result<Ok, QMResult> to OkOrErr.

Differential Revision: https://phabricator.services.mozilla.com/D122206
2021-08-10 13:59:04 +00:00
Jari Jalkanen b2adac0d90 Bug 1711657 - Rename Note to Info in Severity enum and QM_TRY macros. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D121618
2021-08-04 09:39:55 +00:00
Jan Varga 00fa78b012 Bug 1661413 - Improve deleting files in DeleteFileManagerDirectory; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119588
2021-08-03 11:43:50 +00:00
Jan Varga e9546b5acd Bug 1621920 - Convert IDB client to use the new macro for warning about unknown stuff in .files directory and add handling of unknown directories in .files directory; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119586
2021-08-03 10:46:28 +00:00
Jan Varga 064a1e6a2a Bug 1719811 - QM: Replace FirstInitializationAttempt method with WithFirstInitializationAttempt; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119496
2021-08-03 03:24:19 +00:00
Jan Varga 480491b2be Bug 1719811 - QM: Remove FirstInitializationAttemptPending method from FirstInitializationAttempts class; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119495
2021-08-03 03:24:19 +00:00
Jari Jalkanen 131e54eda8 Bug 1722892 - Replace NS_ASSERTION uses in FileStreams.cpp r=janv,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D121554
2021-08-03 02:47:22 +00:00
Jan Rio Krause c003ef765b Bug 1723503 - QM: Restore a blank line in QuotaManager::UpgradeFromPersistentStorageDirectoryToDefaultStorageDirectory r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D121538
2021-08-03 02:46:11 +00:00
Jan Varga 226a68d16d Bug 1718197 - Have a way to set QM_TRY context in ExecuteInitialization; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D118808
2021-07-31 16:32:14 +00:00
Jan Varga a418c56853 Bug 1718197 - Simplify access to FirstInitializationAttempt objects in initialization functions; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119389
2021-07-31 16:32:13 +00:00
Jan Varga e22168a74c Bug 1719281 - QM: Execute initializations in ExecuteInitialization() for real; r=dom-storage-reviewers,asuth
ExecuteInitialization now takes a function argument instead of nsresult so
initializations are executed in the context of ExecuteInitialization. This
patch also removes a temporary overload of ExecuteInitialization.

Differential Revision: https://phabricator.services.mozilla.com/D119263
2021-07-31 12:37:36 +00:00
Jan Varga f269c78d92 Bug 1719281 - QM: Add a generic wrapper for running initializations; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119182
2021-07-31 12:37:36 +00:00
Sandor Molnar 01917ee5ce Backed out 2 changesets (bug 1719281) for causing bc failures in FirstInitializationAttempts. CLOSED TREE
Backed out changeset 58b39579def6 (bug 1719281)
Backed out changeset d6801824d47d (bug 1719281)
2021-07-30 21:53:23 +03:00
Jan Varga 107d5083bc Bug 1719281 - QM: Execute initializations in ExecuteInitialization() for real; r=dom-storage-reviewers,asuth
ExecuteInitialization now takes a function argument instead of nsresult so
initializations are executed in the context of ExecuteInitialization. This
patch also removes a temporary overload of ExecuteInitialization.

Differential Revision: https://phabricator.services.mozilla.com/D119263
2021-07-30 17:51:58 +00:00
Jan Varga 3a089efdf2 Bug 1719281 - QM: Add a generic wrapper for running initializations; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119182
2021-07-30 17:51:58 +00:00
Luca Greco e723364e2c Bug 1720487 - Ensure QuotaManager does not evict PERSISTENT_TYPE_DEFAULT data associated to a WebExtension origin. r=dom-storage-reviewers,asuth
This patch introduce an additional check inside the Helper::GetInactiveOriginInfos static method
used internally by CollectOriginsForEviction to ensure that QuotaManager will not select an
extension origin as an inactive origin to evict non persisted data from.

The rationale is that unlike websites (which may more likely using the locally stored data
as a local cache, but still able to retrieve the same data again from the server side),
extensions do not have a remote counterpart and so evicting their data would result
into potential data loss for the users.

Besides that, the browser extensions (unlike websites) are explicitly installed and uninstalled by
the user and all the data associated to the extension will be completely removed when the
extension is uninstalled.

Differential Revision: https://phabricator.services.mozilla.com/D120470
2021-07-21 19:27:45 +00:00
Gijs Kruitbosch bcbf4ea5cd Bug 1714583 - allow nsIFile::Create to skip creating ancestor directories, to fix IOUtils::makeDirectory, to fix UNC default download folders, r=barret,xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D120338
2021-07-21 18:38:12 +00:00
Jens Stutte 5c48750ff8 Bug 1702421: *::PrepareOriginDirectory should report GetDirectoryMetadata failures as warning only. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D118811
2021-06-25 10:24:23 +00:00
Jan Varga 28f6cf6f67 Bug 1718190 - QM: Move ScopedLogExtraInfo into own h/cpp files; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118807
2021-06-25 10:21:27 +00:00
Jan Varga 66e7ce052c Bug 1717990 - QM: Convert some NS_ERROR_FAILURE which should have been NS_ERROR_ABORT; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118676
2021-06-25 06:27:59 +00:00
Jan Varga b0e742b2d6 Bug 1717990 - QM: Ignore NS_ERROR_ABORT in RecordFirstInitializationAttempt; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118675
2021-06-25 06:27:58 +00:00
Jan Varga 5e3c6d6fc1 Bug 1716570 - LSNG: Add QM_TRY context for PrepareDatastoreOp::DatabaseWork; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118673
2021-06-25 02:46:13 +00:00
Jan Varga 8c85f70a06 Bug 1716569 - Add QM_TRY context for EnsurePersistentOriginIsInitialized and EnsureTemporaryOriginIsInitialized; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D118143
2021-06-24 03:50:17 +00:00
Jan Varga 1e2a90da03 Bug 1716569 - Rename existing QM_TRY contexts; r=dom-storage-reviewers,jstutte
- the dom::quota:: prefix has been added
- it's now clear that the contexts are set only during first initialization
attempts

Differential Revision: https://phabricator.services.mozilla.com/D118142
2021-06-24 03:50:16 +00:00
Jan Varga 614eb7e4fe Bug 1716568 - Add support for origin based first initialization attempts handling to InitializationInfo; r=dom-storage-reviewers,asuth
The existing custom implementation of origin based first initialization
attempts handling has been replaced with the new generic implementation.

Differential Revision: https://phabricator.services.mozilla.com/D118141
2021-06-23 21:26:10 +00:00
Jan Varga e6e7042dab Bug 1716568 - Extract first initialization attempts handling into a generic (templatized) class; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118140
2021-06-23 21:26:10 +00:00
Jan Varga 3fb3dcb5a1 Bug 1716568 - Rename mInitializationAttempts in InitializationInfo to mFirstInitializationAttempts; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118139
2021-06-23 21:26:09 +00:00
Jan Varga 39a2fe3293 Bug 1716568 - Consolidate InitializationInfo::AutoInitializationAttempt class; r=dom-storage-reviewers,jstutte
- the class has been renamed to FirstInitializationAttemptImpl
- the class no longer automatically records first initialization attempts in
its destructor (the auto funcionality has been removed)
- the method names have been shortened
- new methods have been added
- the class is now intended to just forward calls to the owner

Differential Revision: https://phabricator.services.mozilla.com/D118138
2021-06-23 21:26:09 +00:00
Jan Varga b746baa6d7 Bug 1716568 - Rename ResetInitializationAttempts in InitializationInfo to ResetFirstInitializationAttempts; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118135
2021-06-23 21:26:08 +00:00
Jan Varga 3867a0d9b9 Bug 1716568 - Consolidate InitializationInfo::ReportFirstInitializationAttempt; r=dom-storage-reviewers,jstutte
- the method has been renamed to RecordFirstInitializationAttempt
- the second argument has been changed from bool to nsresult
- the method has been made public

Differential Revision: https://phabricator.services.mozilla.com/D118134
2021-06-23 21:26:08 +00:00
Jan Varga 23e78584a2 Bug 1716568 - Add Maybe prefix to InitializationInfo::RecordFirstInitializationAttempt; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118133
2021-06-23 21:26:07 +00:00
Jan Varga b545dac60b Bug 1716568 - Consolidate InitializationInfo::InitializationAttempted; r=dom-storage-reviewers,jstutte
- AssertInitializationAttempted has been removed
- InitializationAttempted has been renamed to FirstInitializationAttemptRecorded
- FirstInitializationAttemptPending has been added

Differential Revision: https://phabricator.services.mozilla.com/D118132
2021-06-23 21:26:07 +00:00
Jan Varga 3a8312aeeb Bug 1716568 - Move implementation details of InitializationInfo to a cpp file; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D118131
2021-06-23 21:26:07 +00:00
Nika Layzell 1aaeb179e2 Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117103
2021-06-09 04:56:48 +00:00
Jan Varga 5770ce1b8f Bug 1713820 - Never inline LogError if the definition is not empty; r=dom-storage-reviewers,jstutte
MOZ_NEVER_INLINE can't 100% guarantee that all compilers never inline such
functions, but the current combination of MOZ_COLD and MOZ_NEVER_INLINE
produces sane builds with only minor code size increase (max 0.19% increase).

Differential Revision: https://phabricator.services.mozilla.com/D117142
2021-06-08 16:27:32 +00:00
Jan Varga 7bd33c1d2e Bug 1713820 - Enable QM_TRY reporting to the browser console in release builds; r=dom-storage-reviewers,jstutte
Failures are not reported to the browser console until a context information is
available like the storage or temporary storage initialization.

Differential Revision: https://phabricator.services.mozilla.com/D117141
2021-06-08 16:27:32 +00:00
Jan Varga 0c9e2f093f Bug 1713820 - Introduce dedicated identifiers for different types of logging and define QM_LOG_ERROR_ENABLED only when at least one such type is defined; r=dom-storage-reviewers,jstutte
This patch doesn't enable or disable logging in specific builds.

Differential Revision: https://phabricator.services.mozilla.com/D117140
2021-06-08 16:27:32 +00:00
Jan Varga 61f3180e41 Bug 1713820 - Don't report to the browser console if the context string is empty; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D117139
2021-06-08 16:27:31 +00:00
Jan Varga ceffdfbfbc Bug 1713820 - Allow to use the context string in other types of logging; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D117138
2021-06-08 16:27:31 +00:00
Jan Varga b04b4c5166 Bug 1713820 - Change the order of helper variable defintion in LogError to match the use in log message construction; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D117137
2021-06-08 16:27:31 +00:00
Jan Varga 1012045fb5 Bug 1713820 - Use QM_SCOPED_LOG_EXTRA_INFO_ENABLED in CachingDatabaseConnection instead of defined(EARLY_BETA_OR_EARLIER) || defined(DEBUG); r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D117136
2021-06-08 16:27:30 +00:00