Commit Graph
74 Commits
Author SHA1 Message Date
Kenneth Skovhede be16323f24 General cleanup, common database validation exception 2025-03-10 14:38:45 +01:00
Kenneth SkovhedeandGitHub 52a73c3418 Fixed issue 5845 (#5880)
* Fixed issue 5845

This commit introduces the test that makes the error.

* Fixed query cleaning up duplicates, in the case that where a block has multiple valid source candidates.

* Reduced number of replicas for the test
2025-01-16 14:27:15 +01:00
Kenneth SkovhedeandGitHub d64c7e721f Handle duplicated missing blocks (#5858)
* Implemented test for #5845

* Removed unittests not executing cleanup.

* Cleanup commit

* Fixed the query that causes the constraint violation
2025-01-10 09:24:54 +01:00
Kenneth SkovhedeandGitHub 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 dedee8fd35 Hand-picked the recreate fixes from #4982.
This fixes that the recreate will move unused blocks into the `DeletedBlock` table after the database has been recreated.
Due to this, the disruption test can now be verified.
2024-11-01 15:56:14 +01:00
Kenneth Skovhede 1dc2acb2bf Ensure repair also works with the index 2024-11-01 15:02:48 +01:00
Kenneth Skovhede be0e4d2ed1 Fixed an incorrect string quote 2024-10-05 17:36:42 +02:00
Jojo-1000 55284410c7 Fix sql queries that use double quoted strings.
Closes #5202
2024-05-30 00:00:48 +02:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
gpatel-frandGitHub ec9d49d684 Experiment/rebuildfaster (#5043)
* experimental faster db rebuild (#4955)

* try run update db query for every block file only when needed
add repair-force-block-use option
more appropriate naming for some routines
more tracing
more comments
2023-11-05 18:19:08 +01:00
Kenneth Hsu 5951047ff1 Fix incorrect or misleading indentations.
This also adds braces to clarify scope where beneficial.
2020-11-21 13:58:16 -08:00
Kenneth Hsu 13e1f0dac6 Remove unused Database members. 2020-03-14 16:45:08 -07:00
BlueBlock e8f3bccef8 spelling fix 2019-09-09 18:28:25 -04:00
BlueBlock a230e3b228 Revert "spelling fix"
This reverts commit 8bb4bfaeb4.
2019-09-09 18:26:01 -04:00
BlueBlock 8bb4bfaeb4 spelling fix 2019-09-09 18:25:29 -04:00
Rune Henriksen 3c986a3fe5 Check the block size to avoid scavenging behavoir when Duplicati can't locate the 'empty' block which doesn't exist 2019-05-05 02:20:32 +02:00
Rune HenriksenandGitHub f5f353fe19 Merge branch 'master' into feature/fix_path_storage2 2019-01-25 23:37:57 +01:00
Rune Henriksen 639edc1e36 removed reference to deleted method 2019-01-11 20:16:59 +01:00
Kenneth Hsu fcf89764c3 Remove unnecessary calls to ToString. 2018-12-31 14:29:44 -08:00
Kenneth Hsu e65bf19221 Remove unused String.Format arguments.
We also make use of string interpolation to improve readability.
2018-12-31 14:24:14 -08:00
Kenneth Skovhede 03722fcba1 Merge branch 'master' into feature/fix_path_storage2
# Conflicts:
#	Duplicati/Library/Main/Database/LocalRecreateDatabase.cs
2018-10-23 11:33:35 +02:00
Kenneth Hsu beb552fa9e Remove unnecessary use of partial keyword.
These classes are defined in a single location.
2018-10-13 16:53:28 -07:00
Kenneth Hsu d72128ec83 Remove unused method parameters. 2018-10-06 15:09:43 -07:00
Kenneth Skovhede 8ac99e83b7 Merge branch 'master' into feature/fix_path_storage2 2018-06-28 10:51:11 +02:00
Kenneth Skovhede cbc18970d5 Re-applied the path-storage fix as the merge failed somehow 2018-06-14 10:12:24 +02:00
Kenneth SkovhedeandGitHub bbe8358ccb Merge pull request #3225 from tygill/fix/improve-repair
Adds a check for BlocksetIDs that don't have any corresponding BlocksetEntrys to the broken fileset check.
2018-06-14 09:20:59 +02:00
Kenneth Skovhede 4b3389f4b6 Fix the missing block references prior to looking for missing block info 2018-06-12 08:29:55 +02:00
Kenneth Skovhede 1f32047042 Don't remove the extra index files immediately, but wait for next compact 2018-06-11 11:20:12 +02:00
Kenneth Skovhede ec363f88a0 Fixed not deleting the non-index volumes 2018-06-11 10:34:32 +02:00
Kenneth Skovhede bce1db123a Merge branch 'master' into feature/speedup_backup_index_files
# Conflicts:
#	Duplicati/Library/Utility/Utility.cs
2018-06-08 10:31:27 +02:00
Kenneth Hsu 20f2f37806 Remove unnecessary calls to String.Format. 2018-06-02 12:02:55 -07:00
Kenneth Hsu f12858e6a5 Mark fields that shouldn't be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2018-05-25 10:04:52 -07:00
Tyler Gill b5931b2771 Adds a check for BlocksetIDs that don't have any corresponding BlocksetEntrys to the broken fileset check.
Bug #3210 (and several other possibly related ones) had cases where a recreated database would have these invalid blockset IDs.
It seems like they were caused by filesets referring to a blockset by hash, but not having any index or block file actually containing the block for that hash.
Also fixes countMissingInformation query - it should join with missingBlocklistVolumes, rather than missingBlocklistEntries, as it is selecting the VolumeID.
2018-05-17 08:11:13 -06:00
Kenneth Skovhede 57367890b9 Updated the query that fixes recreates where some remote dblock files are found through the dindex files, but these are not present. 2018-05-11 11:34:48 +02:00
Kenneth Skovhede 632b4ff0e2 Added support for cases where the recreate finds missing block files that are not needed. 2018-05-10 00:57:51 +02:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01:00
Kenneth Skovhede d08b7750f0 Removed the unnecessary distinct clause from the recreate query.
Added a comment about the potentially unnecessary extra join in the statements that fills in block hashes.
2017-01-19 10:53:32 +01:00
Kenneth Skovhede 305d8bc7fe Added an extra condition on the join for the recreate issue.
This is a less experimental rewrite of the query that fixes the exact problem.
The speedups from this query fix are also substantial, going from 2.5 hours to 11 minutes.

This is likely a fix to these issues:
#1699, #2048, #2140, #2178

This could help with issues:
#1391, #2050
2017-01-19 09:55:36 +01:00
Kenneth Skovhede be46960a6b Added debugging code that dumps the temporary tables as permanent tables if the error from #1699, #2048, #2140, or #2178 2017-01-15 23:08:21 +01:00
Kenneth Skovhede d3a3d8c85f Fixed a mistake in the debugging code for issue 2140 2017-01-11 13:51:56 +01:00
Kenneth Skovhede fd0d0d5529 Added tracing output to track down issue #1699, #2140 and #2178 2017-01-05 21:41:21 +01:00
Kenneth Skovhede d8972b0f2b Removed unused memory cache code 2016-12-16 17:30:39 +01:00
Kenneth Skovhede 3a034c65ff Removed some extra dispose code 2016-10-17 15:32:30 +02:00
Kenneth Skovhede 309bf1648d Merge branch 'master' into feature/fix_for_different_blockhash_and_filehash_plus_multiblocks_metadata
# Conflicts:
#	Duplicati/Library/Main/Database/LocalDatabase.cs
#	Duplicati/Library/Main/Database/LocalRecreateDatabase.cs
#	Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
#	Duplicati/UnitTest/BorderTests.cs
2016-10-17 13:28:27 +02:00
Kenneth Skovhede 0c68daff6c Fixed all whitespace to be 4 spaces instead of tabs 2016-09-15 11:39:27 +02:00
Kenneth Skovhede a350d942e6 Fixed a case where a specially crafted broken index file could prevent the database from being recreated correctly.
This fix also optimizes recreates where data is missing in index files and block files are downloaded.
2016-05-02 20:30:38 +02:00
Kenneth Skovhede 742eab0913 Fixed multiple cases where connections and command instances were not disposed.
This should fix all cases of "File is locked" on windows.
2016-04-06 20:40:34 +02:00
Kenneth Skovhede d101f91c94 Fixed support for metadata larger than blocksize. Now supports one full blocklist of metadata, appx 300mb with default settings.
Added correct handling of metadata hashes, such that a metadata blockset is now handled the same was as a regular file blockset.
The query that creates the filesets does not support more than a single blocklist of metadata, hence the limitiation.
2016-04-04 18:11:48 +02:00
Kenneth Skovhede e40bd7f02a Proposed version, not complete with handling large metadata chunks 2016-04-03 23:10:47 +02:00
Kenneth Skovhede a6699e513d Fixed the repair to also support blocksize values that are not evenly divisible with the blockhash size 2016-03-27 12:50:40 +02:00