Carl Johnsen
4ca147d0f1
More preliminary work towards implicit reusable transaction
2025-05-20 16:27:07 +02:00
Carl Johnsen
9c4eb5a222
FilteredFilenameTable.CreateAsync wasn't static
2025-05-20 08:26:32 +02:00
Carl Johnsen
3e3a9b5aa9
More SQL query restructuring
2025-05-20 06:07:45 +02:00
Carl Johnsen
88db9676b4
Restructured SQL queries in LocalDeleteDatabase and made everything async where applicable
2025-05-19 21:51:28 +02:00
Carl Johnsen
f3f00faf8e
Incorrectly called the synchronous version of a function
2025-05-19 15:45:31 +02:00
Carl Johnsen
973ba1ad9c
Preliminary work on implicit (from an external view) transactions
2025-05-19 14:40:28 +02:00
Carl Johnsen
ae12d63468
Changed TemporaryDbValueList to use factory construction and to be proper async.
2025-05-19 14:27:01 +02:00
Carl Johnsen
2dabf56c82
Additional SQL query whitespaces
2025-05-19 10:46:50 +02:00
Carl Johnsen
cb4e9eb657
Made the LocalDatabase constructor protected to ensure that derived classes won't call the obsolete warning throwing constructor.
2025-05-19 06:40:18 +02:00
Carl Johnsen
c380989aad
Added a readonly property to LocalDatabase's transaction, so derived classes can access it
2025-05-16 15:50:11 +02:00
Carl Johnsen
d9584c5acb
Removed using introduced by IDE
2025-05-16 13:46:05 +02:00
Carl Johnsen
44c037e864
Implemented factory construction of LocalRestoreDatabase
2025-05-16 13:44:57 +02:00
Carl Johnsen
7b3163b851
Post-rebase fixes to LocalDatabase
2025-05-16 12:38:13 +02:00
Carl Johnsen
8230829266
Restructered all of the internal SQL queries for better readability.
...
Also changed most executions of the queries to a chain of method calls instead of a series of statements.
2025-05-16 12:23:46 +02:00
Carl Johnsen
029f560f64
Changed FilteredFilenameTable to a factory-like construction.
2025-05-16 12:22:57 +02:00
Carl Johnsen
1cb7c882f9
Removed calls to a helper function that's been moved to extension methods
2025-05-16 12:22:57 +02:00
Carl Johnsen
46aacbaa4b
Restructured some of the queries in LocalDatabase for readability.
...
Also moved some of the calls to utility functions into the extension methods.
2025-05-16 12:21:56 +02:00
Carl Johnsen
ca52d41347
Ensured more of the calls in LocalDatabase is calling the async versions
2025-05-16 12:21:56 +02:00
Carl Johnsen
c060a214d8
Changed from using constructors to a factory-like pattern
2025-05-16 12:21:56 +02:00
Carl Johnsen
ca4295b37c
Found additional references to old way of accessing the database
2025-05-16 12:21:24 +02:00
Carl Johnsen
bb504c1a44
Post master merge fixes to LocalDatabase
2025-05-16 12:21:24 +02:00
Carl Johnsen
6be2b3f5f5
Updated LocalDatabase to be async using Microsoft.Data.Sqlite
2025-05-16 12:21:24 +02:00
Carl Johnsen
eeb16e3800
Removed whitespace
2025-05-16 11:49:57 +02:00
Kenneth Skovhede
0df9d67a6a
Implemented handling for cases where the previous fileset ends up being empty and removed.
...
This fixes #5862
2025-05-14 23:36:48 +02:00
Kenneth Skovhede
547ad8437c
Revert "Ignore filesets that are in the deleting state"
...
This reverts commit 513e67418d .
2025-05-11 15:39:27 +02:00
Kenneth Skovhede
513e67418d
Ignore filesets that are in the deleting state
2025-05-10 22:12:45 +02:00
Kenneth Skovhede
b947f7a7a0
Simplified a query
2025-05-09 11:12:45 +02:00
Kenneth Skovhede
d22ce5370e
Rewrote the repair for scenarios where remote files are missing.
...
This adds a number of additional features to the repair process so it can actually fully recover if all data is present.
Also added a several tests to ensure that the functionality works in multiple scenarios.
This fixes #5987
2025-05-08 10:31:38 +02:00
Kenneth Skovhede
a3bc9b80ca
Implemented 4 new list methods that are optimized for a single operation
2025-04-29 10:03:57 +02:00
Kenneth Skovhede and GitHub
2837a105ee
Merge pull request #6186 from duplicati/feature/add-sqlite-cache-value
...
Added option to set the SQLite page cache
2025-04-25 14:45:43 +02:00
Kenneth Skovhede and GitHub
4515e13342
Merge pull request #6199 from duplicati/feature/add-downgrade-db-tool
...
Added a database downgrade tool
2025-04-25 14:43:59 +02:00
Kenneth Skovhede and GitHub
1bbe04a782
Merge branch 'master' into feature/add-sqlite-cache-value
2025-04-25 13:58:24 +02:00
Kenneth Skovhede
ba298df915
Added an upgrade command to the database tool
2025-04-25 12:30:03 +02:00
Kenneth Skovhede
ebaf725598
Fixed a case where ArchiveTime could be created as nullable
2025-04-24 21:26:24 +02:00
Kenneth Skovhede
2ef04e43ee
Simplified new ArchiveTime column to not allow null
2025-04-24 20:30:08 +02:00
Kenneth Skovhede
75f7582014
Fixed passing transaction to more places
2025-04-24 20:28:26 +02:00
Kenneth Skovhede
46f5efd178
Merge branch 'master' into feature/support-glacier-style-non-readable-files
2025-04-23 22:37:31 +02:00
Kenneth Skovhede
e0475f3a9c
Ignore any error on pragma optimize.
...
Previous logic would only catch SQLite exceptions, but it is just a performance thing, so we can ignore any errors (they are still logged)
2025-04-23 16:40:36 +02:00
Kenneth Skovhede and GitHub
171eb1bb12
Merge branch 'master' into feature/add-sqlite-cache-value
2025-04-23 16:34:55 +02:00
Kenneth Skovhede
18477c572d
Fixed some nullability warnings
2025-04-23 15:40:16 +02:00
Kenneth Skovhede
0a7a1cd689
Added option to set the SQLite page cache
...
This adds an extra option to allow setting the SQLite page cache size as a regular option.
Prior to this commit it was only possible to set the SQLite page cache size via environment variables.
The option to use environment variables is preserved, and as options from the environment variable are applied after the new setting, environment variables take precedence.
The default value for the new option is to use 1% of the system memory for the page cache. For the restore process, a connection per worker may be made which defaults to half the number of cores, so the maximum amount of memory is 1% * half the CPU cores.
This is just the upper limit, and SQLite may choose not to use all of it.
This fixes #6178
2025-04-22 14:26:46 +02:00
Kenneth Skovhede
faede65d8d
Changed transactions to use a wrapper that ensures a transaction is allocated.
2025-04-14 12:04:00 +02:00
Kenneth Skovhede
2060e9067d
Clear databases fileset entries prior to recreate
2025-04-03 22:20:42 +02:00
Kenneth Skovhede
2006556778
Fixed some more nullable support in the database layer
2025-04-03 15:46:20 +02:00
Kenneth Skovhede
ef449bc569
Some nullable updates
2025-04-03 14:32:47 +02:00
Kenneth Skovhede
35682bd4fe
Cleaned up some nullability issues
2025-04-03 14:20:00 +02:00
Kenneth Skovhede
7b948a2f1d
Fixed issue with SQLite bindings not supporting arrays.
...
Added helper class to wrap values in a temporary table if they exceeed the maximum number of parameters.
2025-04-02 23:26:20 +02:00
Kenneth Skovhede
08cb034acf
Added custom version of the validation to support not failing validation prior to running the repair that fixes the error.
2025-03-25 11:56:52 +01:00
Kenneth Skovhede
d40301b2b7
Guard against fileset errors
...
This PR adds a few extra consistency checks to the database, so any failure in the operations is detected earlier than before.
Especially when cleaning temporary and partial files, it is important that the deletes do not remove unexpected entries.
Also, after a recreate, repair or purge command, the database consistency is verified, so it becomes easier to identify which operation caused the failure.
To assist in trouble shooting, there is also a more elaborate error message if a fileset discrepancy is detected, that pinpoints which versions are affected.
Finally, the repair command has been extended to support recreating a fileset from the remote data.
2025-03-20 15:59:14 +01:00
Kenneth Skovhede and GitHub
2e3f867fa6
Merge pull request #6061 from duplicati/feature/untangle-db-and-results
...
Untangle the results and database
2025-03-20 12:02:55 +01:00