This also fixes a bug in the test_connection_online_backup.js test which wasn't
properly evaluating that the page_size PRAGMA was being copied properly.
Differential Revision: https://phabricator.services.mozilla.com/D207471
This utility copies an SQLite database, but does so just by performing a file
copy on the database itself. It assumes that there are no open connections on
the underlying database file.
Given that this is only used by Places, and that a later patch in this stack
adds a database backup utility that works even if there are open connections,
means we can move this old utility out form the mozIStorageService and into
a dedicated Places helper instead.
Differential Revision: https://phabricator.services.mozilla.com/D198309
The API can only load from a predetermined list of extensions statically built
in the same library as SQLite (either nss3 or mozsqlite3 at this time).
New extensions must be audited and their code updated through the update.sh
script.
All the extensions should be compilable and usable across all the tier1
platforms and from Rusqlite.
Differential Revision: https://phabricator.services.mozilla.com/D191316
The API can only load from a predetermined list of extensions statically built
in the same library as SQLite (either nss3 or mozsqlite3 at this time).
New extensions must be audited and their code updated through the update.sh
script.
All the extensions should be compilable and usable across all the tier1
platforms and from Rusqlite.
Differential Revision: https://phabricator.services.mozilla.com/D191316
Set a default journal_size_limit, so journals are always truncated to a sensible
max size. Change existing consumers to just use the default, but Places that is
using a larger 4MiB limit.
Change auxiliary files (-shm, -journal, -wal, ...) persistance on disk, to
avoid the cost of creating and removing them. Since there is a journal_size_limit
they will be truncated instead of deleted.
Differential Revision: https://phabricator.services.mozilla.com/D172185
As previously discussed, we're not using this telemetry at the moment, we used
it in the past to study main thread IO.
Simplifying the VFS allows us to more easily experiment with other settings
in the future.
Differential Revision: https://phabricator.services.mozilla.com/D172016
Add asyncVacuum to mozIStorageAsyncConnection, that dispatches a runnable to
the helper thread, where it will execute a full or incremental vacuum, depending
on the connection auto_vacuum value.
It also supports vacuuming attached schemas.
asyncVacuum() supports changing both the page_size and auto_vacuum.
Change mozIStorageVacuumParticipant to return a mozIStorageAsyncConnection and
allow specifying whether incremental vacuum should be enabled.
Change vacuumManager notification from heavy-io-task to vacuum-begin and vacuum-end
since the original proposal of notifying heavy IO didn't take off.
Cleanup test_vacuum to be able to use instances of the test VacuumParticipant,
that means we can remove the no more necessary registerESM hack.
Fix Places History as the only cpp consumer.
Differential Revision: https://phabricator.services.mozilla.com/D168298
Add asyncVacuum to mozIStorageAsyncConnection, that dispatches a runnable to
the helper thread, where it will execute a full or incremental vacuum, depending
on the connection auto_vacuum value.
It also supports vacuuming attached schemas.
asyncVacuum() supports changing both the page_size and auto_vacuum.
Change mozIStorageVacuumParticipant to return a mozIStorageAsyncConnection and
allow specifying whether incremental vacuum should be enabled.
Change vacuumManager notification from heavy-io-task to vacuum-begin and vacuum-end
since the original proposal of notifying heavy IO didn't take off.
Cleanup test_vacuum to be able to use instances of the test VacuumParticipant,
that means we can remove the no more necessary registerESM hack.
Fix Places History as the only cpp consumer.
Differential Revision: https://phabricator.services.mozilla.com/D168298
When ignoreLockingMode option is used, we default to the unix-none or win32-none
VFS, and enforce the connection to be read-only, because it's trivial to
corrupt data using a no-lock VFS.
Unfortunately read-only mode doesn't allow to open a WAL database if the journal
files are missing, unless the device is marked as "immutable".
There is no SQLITE_OPEN_* flag for immutable, and adding one could easily be
misinterpreted since it only makes sense for read-only.
This implement a readonly-immutable-nolock VFS shim on top of unix-none or
win32-none that overrides device characteristics with immutable. When
ignoreLockingMode option is specified, we use this VFS. It can only be used on
read-only connections, as enforced both by Storage service and a MOZ_ASSERT.
Differential Revision: https://phabricator.services.mozilla.com/D162492
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.
Differential Revision: https://phabricator.services.mozilla.com/D158213