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

1412 Коммитов

Автор SHA1 Сообщение Дата
Mike Conley 4259a99082 Bug 1869060 - Add SQLite Online Backup API support via mozIStorageAsyncConnection. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D195934
2024-01-22 14:26:53 +00:00
Mike Conley f893e12aea Bug 1869060 - Move old backupDatabaseFile utility out from mozIStorageService to a Places helper. r=mak,places-reviewers
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
2024-01-22 14:26:52 +00:00
Tomislav Jovanovic 11996c6f38 Bug 1871991 - Required arguments after optional are not supported r=jesup
I reviewed all js callsites, and they always use all arguments,
so this should  be no-op.

Differential Revision: https://phabricator.services.mozilla.com/D197300
2024-01-04 02:06:08 +00:00
Joel Maher 81afbdce9a Bug 1859896 - Batch 16 - convert xpcshell.ini -> .toml. r=aryx,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194383
2023-11-25 21:08:44 +00:00
Marco Bonardo 497899ec5d Bug 1855455 - Implement a loadExtension() API in mozStorage. r=asuth
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
2023-11-21 08:34:35 +00:00
Marco Bonardo b3b546b288 Bug 1855455 - Vendor SQLite and FTS5 as a run-time loadable extension. r=asuth,glandium
Move SQLite updates to the `mach vendor` system to simplify updates.
This will have to be invoked manually through `./mach vendor`, as updatebot
is not hooked up yet (tracking new versions through Github tags is not reliable).

Build FTS5 statically in the same library as SQLite, but as a run-time
loadable extension.
Other extensions will similarly be added in the future, consumers can then use
mozStorage `loadExtension()` or Rusqlite `load_extension()` to load them.
FTS5 is used as a first example and for unit tests. While it could be enabled
statically, we prefer to have it on-demand and per connection.

Differential Revision: https://phabricator.services.mozilla.com/D191314
2023-11-21 08:34:34 +00:00
Butkovits Atila 5ac3149a96 Backed out changeset dafb434a3dd2 (bug 1855455) for causing build bustages. CLOSED TREE 2023-11-21 10:28:13 +02:00
Marco Bonardo 1ba9c659c7 Bug 1855455 - Vendor SQLite and FTS5 as a run-time loadable extension. r=asuth,glandium
Move SQLite updates to the `mach vendor` system to simplify updates.
This will have to be invoked manually through `./mach vendor`, as updatebot
is not hooked up yet (tracking new versions through Github tags is not reliable).

Build FTS5 statically in the same library as SQLite, but as a run-time
loadable extension.
Other extensions will similarly be added in the future, consumers can then use
mozStorage `loadExtension()` or Rusqlite `load_extension()` to load them.
FTS5 is used as a first example and for unit tests. While it could be enabled
statically, we prefer to have it on-demand and per connection.

Differential Revision: https://phabricator.services.mozilla.com/D191314
2023-11-21 08:08:44 +00:00
Patryk Gruszka 1239337577 Bug 1862507 - mozStorageSQLFunctions.cpp: do not use 'else' after 'return'. r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D193493
2023-11-16 08:19:48 +00:00
Sandor Molnar ec89f35c95 Backed out 3 changesets (bug 1855455) for causing build bustages at third_party/sqlite3/src/version
Backed out changeset 0a5cdc279edd (bug 1855455)
Backed out changeset f43c32558446 (bug 1855455)
Backed out changeset bda7a6ca45db (bug 1855455)
2023-11-15 19:17:16 +02:00
Marco Bonardo 94ef632ae2 Bug 1855455 - Implement a loadExtension() API in mozStorage. r=asuth
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
2023-11-15 10:52:50 +00:00
Marco Bonardo 7ddc1e299a Bug 1855455 - Vendor SQLite and FTS5 as a run-time loadable extension. r=asuth,glandium
Move SQLite updates to the `mach vendor` system to simplify updates.
This will have to be invoked manually through `./mach vendor`, as updatebot
is not hooked up yet (tracking new versions through Github tags is not reliable).

Build FTS5 statically in the same library as SQLite, but as a run-time
loadable extension.
Other extensions will similarly be added in the future, consumers can then use
mozStorage `loadExtension()` or Rusqlite `load_extension()` to load them.
FTS5 is used as a first example and for unit tests. While it could be enabled
statically, we prefer to have it on-demand and per connection.

Differential Revision: https://phabricator.services.mozilla.com/D191314
2023-11-15 10:52:49 +00:00
Sylvestre Ledru 1e776756dd Bug 1856795 - ride along: use = default; on some recently modified files r=emilio
More on:
https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html

Command:
L=$(hg export -r tip|grep +++|cut -d/ -f2-)
./mach static-analysis check --checks="-*, modernize-use-equals-default" --fix $L

Differential Revision: https://phabricator.services.mozilla.com/D191016
2023-10-15 15:29:03 +00:00
Sylvestre Ledru d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan 6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru c164bd9937 Bug 1856795 - ride along: use = default; on some recently modified files r=emilio
More on:
https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html

Command:
L=$(hg export -r tip|grep +++|cut -d/ -f2-)
./mach static-analysis check --checks="-*, modernize-use-equals-default" --fix $L

Differential Revision: https://phabricator.services.mozilla.com/D191016
2023-10-14 17:34:27 +00:00
Sylvestre Ledru cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Marco Bonardo 30115fd206 Bug 1855448 - Cleanup: remove non necessary SQLITE_MAX_LIKE_PATTERN_LENGTH define. r=asuth
Depends on D189392

Differential Revision: https://phabricator.services.mozilla.com/D189393
2023-09-28 11:41:47 +00:00
Marco Bonardo 69b45023f2 Bug 1855448 - Enable Sqlite FTS3 extension only for Thunderbird and Seamonkey. r=asuth,mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D189392
2023-09-28 11:41:47 +00:00
hsingh b2cc4c68f4 Bug 1843229: Created header files to declare external functions in BaseVFS.cpp, QuotaVFS.cpp and ObfuscatingVFS.cpp.r=janv,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187992
2023-09-26 14:51:38 +00:00
hsingh e941d3eb16 Bug 1843229: Fixing wrong cast.r=janv,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187283
2023-09-26 14:51:38 +00:00
Marco Bonardo ae32ce0ce1 Bug 1834043 - Add a configure option to disable Sqlite auxiliary files persistence. r=glandium,tjr
Not using a pref because Storage has connections using helper threads and the
main thread, thus we prefer to avoid mutex costs for a pref we'll likely not
use in Firefox. Also using a "once" pref would require some coordination because
Storage may try to lazy init once prefs from different threads concurrently,
causing potential deadlocks.

Differential Revision: https://phabricator.services.mozilla.com/D183724
2023-08-01 08:02:34 +00:00
Marco Bonardo f104bcd4be Bug 1834043 - Enable Sqlite auxiliary files persistence in Release. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D182770
2023-08-01 08:02:33 +00:00
Marco Bonardo 016cc78dda Bug 1638256 - Some casts and fixes in mozStorage to make clang-tidy happy. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D181551
2023-06-24 10:11:28 +00:00
Marco Bonardo 95fe144ede Bug 1638256 - Use mTelemetryFilename for the mozStorage thread name. r=asuth
Depends on D181037

Differential Revision: https://phabricator.services.mozilla.com/D181038
2023-06-24 10:11:28 +00:00
Marco Bonardo 81f54fd826 Bug 1638256 - Initialize mTelemetryFilename in the Connection constructor. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D181037
2023-06-24 10:11:28 +00:00
Norisz Fay 45e83e3152 Backed out 3 changesets (bug 1638256) for causing GTest failures CLOSED TREE
Backed out changeset 556614d4b90a (bug 1638256)
Backed out changeset dfd4d3679ccf (bug 1638256)
Backed out changeset 30c66c06f6ce (bug 1638256)
2023-06-21 22:41:40 +03:00
Marco Bonardo 02b6c343ec Bug 1638256 - Some casts and fixes in mozStorage to make clang-tidy happy. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D181551
2023-06-21 18:47:19 +00:00
Marco Bonardo 48ecbc8fd9 Bug 1638256 - Use mTelemetryFilename for the mozStorage thread name. r=asuth
Depends on D181037

Differential Revision: https://phabricator.services.mozilla.com/D181038
2023-06-21 18:47:19 +00:00
Marco Bonardo 6bfee9629b Bug 1638256 - Initialize mTelemetryFilename in the Connection constructor. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D181037
2023-06-21 18:47:19 +00:00
Mark Banner 130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Mike Hommey 17cb194f8d Bug 1833799 - Avoid a copy that clang 7 warns about. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D178417
2023-05-18 21:31:33 +00:00
Jan Varga e0a38c914c Bug 1833233 - Add description for some database header fields; r=dom-storage-reviewers,hsingh,asuth
Differential Revision: https://phabricator.services.mozilla.com/D178230
2023-05-16 20:59:36 +00:00
hsingh cc5fae2ee8 Bug 1833233: Fix incremental vacuum on encrypted sqlite IDB databases.r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D178200
2023-05-16 19:44:36 +00:00
Marco Bonardo 4de92044b6 Bug 1820478 - Set a default Sqlite journal size limit, and persist auxiliary files. r=asuth
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
2023-05-12 09:45:02 +00:00
Marco Bonardo b0f78a8a6b Bug 1065923 - Remove histograms from Storage BaseVFS. r=janv,mossop,dom-storage-reviewers
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
2023-05-10 11:51:49 +00:00
Marco Bonardo b99a4a2645 Bug 1065923 - Rename Storage TelemetryVFS to BaseVFS. r=janv
Differential Revision: https://phabricator.services.mozilla.com/D172015
2023-05-10 11:51:48 +00:00
Jan Varga bee102a1b1 Bug 1827351 - Fix non-unified-build bustage in storage/test/gtest/test_deadlock_detector.cpp; r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D175098
2023-04-11 07:03:37 +00:00
Jan Varga ac281d953a Bug 1822889 - Fix problems in ObfuscatingVFS with decoding frames read from the WAL file during recovery; r=dom-storage-reviewers,asuth,hsingh
Differential Revision: https://phabricator.services.mozilla.com/D172824
2023-04-04 14:10:39 +00:00
serge-sans-paille 75254c349a Bug 1826074 - Make storage/test/gtest buildable outside of a unified build environment r=andi
Depends on D174459

Differential Revision: https://phabricator.services.mozilla.com/D174460
2023-04-03 20:39:13 +00:00
serge-sans-paille 13e51277df Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-04-01 08:31:12 +00:00
serge-sans-paille d90fc7ba40 Bug 1824557 - Make storage/ buildable outside of a unified build environment
Differential Revision: https://phabricator.services.mozilla.com/D173637
2023-03-31 13:29:43 +00:00
Cristian Tuns 8e06a7a853 Backed out 12 changesets (bug 1825325, bug 1825336, bug 1825333, bug 1825332, bug 1825324, bug 1824557, bug 1825328, bug 1825335, bug 1825330, bug 1825329, bug 1825327, bug 1825331) for causing build bustages in nsClipboard.cpp CLOSED TREE
Backed out changeset 9de3ed24d3a0 (bug 1825336)
Backed out changeset aef787728f19 (bug 1825335)
Backed out changeset a04c341244c1 (bug 1825333)
Backed out changeset e3ad15f762ba (bug 1825332)
Backed out changeset eed23da92a27 (bug 1825331)
Backed out changeset 8213bb54376e (bug 1825330)
Backed out changeset 747ec5ac4994 (bug 1825329)
Backed out changeset e91ff431f92d (bug 1825328)
Backed out changeset 59c18d13768b (bug 1825327)
Backed out changeset 538096d99e49 (bug 1825325)
Backed out changeset c76eb9d9b095 (bug 1825324)
Backed out changeset 8b81410eb686 (bug 1824557)
2023-03-31 12:58:53 -04:00
serge-sans-paille 0702cdc836 Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Depends on D173637

Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-03-31 13:29:44 +00:00
serge-sans-paille ab98027047 Bug 1824557 - Make storage/ buildable outside of a unified build environment
Differential Revision: https://phabricator.services.mozilla.com/D173637
2023-03-31 13:29:43 +00:00
Marco Bonardo 8b8e0dab50 Bug 1824076 - Storage Error categorical histogram is reporting to the wrong label. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D173409
2023-03-27 13:36:39 +00:00
Marco Bonardo f3e842d937 Bug 1813986 - Add an asyncVacuum() method to storage async connections, and let VacuumManager use it. r=asuth
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
2023-03-22 15:36:37 +00:00
Noemi Erli eac4250835 Backed out 2 changesets (bug 1813986) for causing build bustages in Logging.h
Backed out changeset 14879c9b6b3c (bug 1813986)
Backed out changeset d90fa56c73e5 (bug 1813986)
2023-03-22 01:19:57 +02:00
Marco Bonardo daa6ee1e11 Bug 1813986 - Add an asyncVacuum() method to storage async connections, and let VacuumManager use it. r=asuth
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
2023-03-21 17:28:04 +00:00