Carl Johnsen
26c48c7e62
Post merge with master fixes
2025-06-19 12:24:22 +02:00
Carl Johnsen
f6ac30e831
Merge remote-tracking branch 'upstream/master' into performance/mssqlite-async
2025-06-19 12:17:30 +02:00
Carl Johnsen
2412800c0c
Removed the sqlite page cache option. It should be set through the environment variable, or some other way of providing a custom database configurotion
2025-06-19 11:41:39 +02:00
Carl Johnsen
78d649f5a3
All of the non-internal-library methods calling the database functions forwards CancellationToken.None
2025-06-19 11:00:24 +02:00
Kenneth Skovhede
2c5c01160c
Added a check and repair for empty metadata
...
This PR adds a check for empty metadatasets (length = 0) and replaces such sets with a default metadataset.
This fixes #6350
2025-06-16 16:35:07 +02:00
Kenneth Skovhede
8fca01f64f
Updated NUnit
...
This closes #4939
2025-06-13 11:48:24 +02:00
Carl Johnsen
3d11a05400
Added .ConfigureAwait(false) to all of the await statements
2025-06-12 08:34:29 +02:00
Carl Johnsen
f9428fee5e
Updated RepairHandlerTests.RepairExtraIndexFiles to use the new async database methods
2025-05-27 09:41:07 +02:00
Carl Johnsen
44c0754495
Removed whitespace
2025-05-27 09:40:30 +02:00
Kenneth Skovhede
c514dd374a
Fixed issue with broken database giving errors on repair
2025-05-20 22:10:51 +02:00
Kenneth Skovhede
2b364d8ca1
Fixed wrong assumption in tests
2025-05-10 09:47:50 +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
c3e0f7369e
Added comment
2025-04-03 22:27:13 +02:00
Kenneth Skovhede
7369ecfbfb
Slightly easier to read numbers
2025-04-03 21:35:16 +02:00
Kenneth Skovhede
d55ac02d3f
Added tests for better coverage
2025-04-03 21:05:22 +02:00
Kenneth Skovhede
2006556778
Fixed some more nullable support in the database layer
2025-04-03 15:46:20 +02:00
Kenneth Skovhede
9e2ac7c716
Fixed tests
2025-04-03 13:58:54 +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
fa765f7d6d
Extended test to validate that the test is actually working
2025-03-20 16:12:28 +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
b63869448a
Ignore warning when reparing broken database
2025-03-11 17:00:14 +01:00
Kenneth Skovhede
351fb89509
Ignoring timestamps in with dirty database test
2025-03-11 10:45:44 +01:00
Kenneth Skovhede
0274fc2b6e
Added sleeps to ensure timestamps have space for repairs
2025-03-11 08:08:28 +01:00
Kenneth Skovhede
d053470cf9
Added additional tests for repair code
2025-03-10 14:40:13 +01:00
Kenneth Skovhede and GitHub
9464caf622
Feature/update license 2025 ( #5851 )
...
* Fixed some minor whitespace issues
* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth Skovhede
e9c256c7f2
Merge remote-tracking branch 'origin/master' into feature/fix-leftover-index
2024-10-29 16:40:06 +01:00
Kenneth Skovhede
375f1875d1
Merge remote-tracking branch 'origin/master' into feature/auto-repair-locked-db-fix-v2
2024-09-10 13:54:28 +02:00
Kenneth Skovhede
ae172a3e4e
Fixed tests being too fast which messes up the backup timestamps
2024-09-10 12:47:19 +02:00
Kenneth Skovhede
238f4beb93
Test for locked database during auto-repair
2024-09-10 10:14:22 +02:00
Kenneth Skovhede
3e2de88648
Added test to cover recreating database and index files with corrupted index data
2024-09-09 17:17:24 +02:00
Kenneth Skovhede
ff6757877f
Fixing the inconsistency check on repair.
...
Update the SQL to also group on size (just in case).
Renamed the normal read method to signal that it is unverified.
Made the verified reader use enumeration state machine to avoid materializing the list.
`var`-ified some of the test code.
2024-09-09 15:27:37 +02:00
Kenneth Skovhede
17d9b89fbb
Merge branch 'master' into fix-repair-index-consistency
...
# Conflicts:
# Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
2024-09-09 11:49:34 +02:00
Jojo-1000
0b92f19572
Merge branch 'master' into fix-leftover-index
2024-05-11 23:37:21 +02:00
Kenneth Skovhede
473c6cbbb8
Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade
2024-03-04 12:21:53 +01:00
Kenneth Skovhede
d7f027b9e2
Fixed usings in unit tests
2024-03-03 15:41:49 +01:00
Kenneth Skovhede
aa20088c39
Tool based upgrade of all projects with some manual update
2024-03-01 14:29:54 +01:00
Kenneth Skovhede
40dd3c6816
Updated all license mentions to MIT
2024-02-28 15:45:30 +01:00
Jojo-1000
cf8f5e64cd
Fix LocalDatabase.GetBlocklists for some cases.
...
Closes #3202
Also add test to ensure that repair works as intended.
2023-12-12 21:28:05 +01:00
Jojo-1000
33aab2aec2
Add test for repair with extra index files.
2023-10-08 22:34:09 +02:00
Thomas Suckow
5956b771f0
Cleanup inconsistent overrides of test SetUp and TearDown.
...
Also add some memory usage diagnostics
2022-05-05 22:30:15 -07:00
Kenneth Hsu
d4b349bb99
Add test for repairing multiple missing blocklist hashes.
...
This concerns issue #4397 .
2020-12-26 21:43:43 -08:00
Kenneth Hsu
e1a6ae4483
Check operation results for errors and warnings in tests.
2020-07-05 18:50:10 -07:00
Kenneth Hsu
1892ba8d0a
Fix poorly named test file.
2020-01-10 20:12:01 -08:00
Kenneth Hsu
adc3249b9f
Assert that dindex files exist.
2020-01-09 21:32:33 -08:00
Kenneth Hsu
91db2466ec
Add test for repairing with missing dindex files.
...
This concerns issue #4046 .
2020-01-09 20:18:42 -08:00