gecko-dev/storage
Marco Bonardo 14784dc42d Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi
mozStorage used to read prefs on service init, because they could only be read
on the main-thread. When service init was moved earlier, it started trying
to read prefs too early, before the profile was set up, thus it ended up always
reading the default value.

This patch moves the only relevant pref to mirrored StaticPrefs that can be accessed
from different threads, and removes two preferences that apparently are not necessary
(they have been broken from a long time) for now.
In particular, providing a global synchronous setting is a footgun, each consumer should
decide about their synchronous needs, rather than abusing a dangerous "go fast" setting.
The page size is something we don't change from quite some time, and it's unlikely to be
used to run experiments in the wild before doing local measurements first, for which Try
builds are enough.

The remaining exclusiveLock pref is a bit controversial, because in general exclusive lock
is better for various reasons, and mostly it is necessary to use WAL on network shares.
Though developers may find it useful for debugging, and some third parties are doing
dangerous things (like copying over databases) to work around it, for which it's safer to
provide a less dangerous alternative.
Note exclusive lock only works on Unix-derived systems for now (no Windows implementation).

Finally, this introduces a fallback to exclusive lock, so that if a third party is using our
databases, so that we can't get an exclusive lock, we'll fallback to normal locking.

Differential Revision: https://phabricator.services.mozilla.com/D82717
2020-07-10 21:45:53 +00:00
..
build Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi 2020-07-09 21:42:25 +00:00
rust Bug 1613835 - Use a SQLite API call to check for in-progress transactions. r=mak 2020-03-03 22:57:39 +00:00
test Bug 1649554: Part 1 - Move deprecated component registration helpers out of XPCOMUtils. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,whimboo,twisniewski 2020-07-10 23:58:30 +00:00
variant Bug 1622949 - Add HashPropertyBag::clone_from_bag. r=froydnj 2020-03-17 23:33:45 +00:00
FileSystemModule.cpp
FileSystemModule.h
IStorageBindingParamsInternal.h
moz.build Bug 1620198 - Part 4: Remove mozIStorageAggregateFunction. r=asuth 2020-06-08 10:00:31 +00:00
mozIStorageAsyncConnection.idl Bug 1620198 - Part 1: Remove CreateAggregateFunction. r=asuth 2020-06-08 09:59:57 +00:00
mozIStorageAsyncStatement.idl
mozIStorageBaseStatement.idl
mozIStorageBindingParams.idl
mozIStorageBindingParamsArray.idl
mozIStorageCompletionCallback.idl
mozIStorageConnection.idl Bug 1613835 - Use a SQLite API call to check for in-progress transactions. r=mak 2020-03-03 22:57:39 +00:00
mozIStorageError.idl
mozIStorageFunction.idl
mozIStoragePendingStatement.idl
mozIStorageProgressHandler.idl
mozIStorageResultSet.idl
mozIStorageRow.idl
mozIStorageService.idl
mozIStorageStatement.idl
mozIStorageStatementCallback.idl
mozIStorageVacuumParticipant.idl
mozIStorageValueArray.idl
mozStorageArgValueArray.cpp
mozStorageArgValueArray.h
mozStorageAsyncStatement.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
mozStorageAsyncStatement.h Bug 1626456 - Remove stray nsAutoPtr.h includes. r=KrisWright 2020-04-03 21:05:46 +00:00
mozStorageAsyncStatementExecution.cpp Bug 1643491 - Check for cancellation in SQLITE_BUSY loop r=mak 2020-06-09 19:47:53 +00:00
mozStorageAsyncStatementExecution.h Bug 1639658 - make AsyncExecuteStatements use mozilla::Runnable; r=asuth 2020-05-20 18:41:28 +00:00
mozStorageAsyncStatementJSHelper.cpp
mozStorageAsyncStatementJSHelper.h
mozStorageAsyncStatementParams.cpp
mozStorageAsyncStatementParams.h
mozStorageBindingParams.cpp Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika 2020-04-24 13:35:27 +00:00
mozStorageBindingParams.h
mozStorageBindingParamsArray.cpp Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika 2020-04-24 13:35:27 +00:00
mozStorageBindingParamsArray.h Bug 1626456 - Remove stray nsAutoPtr.h includes. r=KrisWright 2020-04-03 21:05:46 +00:00
mozStorageConnection.cpp Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi 2020-07-10 21:45:53 +00:00
mozStorageConnection.h Bug 1620198 - Part 3: Change type of FunctionInfo::function to nsCOMPtr<mozIStorageFunction>. r=asuth 2020-06-08 10:00:24 +00:00
mozStorageError.cpp
mozStorageError.h
mozStorageHelper.h Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
mozStoragePrivateHelpers.cpp
mozStoragePrivateHelpers.h Bug 1626456 - Remove stray nsAutoPtr.h includes. r=KrisWright 2020-04-03 21:05:46 +00:00
mozStorageResultSet.cpp
mozStorageResultSet.h
mozStorageRow.cpp
mozStorageRow.h
mozStorageService.cpp Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi 2020-07-10 21:45:53 +00:00
mozStorageService.h Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi 2020-07-10 21:45:53 +00:00
mozStorageSQLFunctions.cpp
mozStorageSQLFunctions.h
mozStorageStatement.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
mozStorageStatement.h Bug 1626456 - Remove stray nsAutoPtr.h includes. r=KrisWright 2020-04-03 21:05:46 +00:00
mozStorageStatementData.h Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika 2020-04-07 15:16:23 +00:00
mozStorageStatementJSHelper.cpp
mozStorageStatementJSHelper.h
mozStorageStatementParams.cpp
mozStorageStatementParams.h
mozStorageStatementRow.cpp
mozStorageStatementRow.h
SQLCollations.cpp
SQLCollations.h
SQLiteMutex.h Bug 1611386 - Drop support for --enable-system-sqlite. r=asuth,glandium 2020-02-20 22:16:03 +00:00
StatementCache.h Bug 1626456 - Remove stray nsAutoPtr.h includes. r=KrisWright 2020-04-03 21:05:46 +00:00
storage.h
StorageBaseStatementInternal.cpp Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika 2020-04-24 13:35:27 +00:00
StorageBaseStatementInternal.h Bug 1626456 - Remove stray nsAutoPtr.h includes. r=KrisWright 2020-04-03 21:05:46 +00:00
style.txt
TelemetryVFS.cpp Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi 2020-07-10 21:45:53 +00:00
VacuumManager.cpp Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi 2020-07-10 21:45:53 +00:00
VacuumManager.h
Variant_inl.h
Variant.cpp
Variant.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in storage. r=asuth 2020-03-16 10:56:56 +00:00
variantToSQLiteT_impl.h