Commit Graph
101 Commits
Author SHA1 Message Date
Kenneth Skovhede 473c6cbbb8 Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade 2024-03-04 12:21:53 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Thomas Suckow d528703fe7 Merge branch 'master' into experiment/net5-split
# Conflicts:
#	.github/workflows/tests.yml
#	Duplicati.sln
#	Duplicati/CommandLine/BackendTester/Duplicati.CommandLine.BackendTester.csproj
#	Duplicati/CommandLine/BackendTool/Duplicati.CommandLine.BackendTool.csproj
#	Duplicati/CommandLine/Duplicati.CommandLine.csproj
#	Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj
#	Duplicati/Library/Backend/AzureBlob/AzureBlobWrapper.cs
#	Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj
#	Duplicati/Library/Backend/Mega/packages.config
#	Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj
#	Duplicati/Library/Backend/Tardigrade/Duplicati.Library.Backend.Tardigrade.csproj
#	Duplicati/Library/Backend/Tardigrade/Properties/AssemblyInfo.cs
#	Duplicati/Library/Backend/Tardigrade/packages.config
#	Duplicati/Library/Common/Duplicati.Library.Common.csproj
#	Duplicati/Library/Common/IO/SystemIOWindows.cs
#	Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj
#	Duplicati/Library/Modules/Builtin/packages.config
#	Duplicati/Library/Utility/Utility.cs
#	Duplicati/License/Duplicati.License.csproj
#	Duplicati/Server/Duplicati.Server.csproj
#	Duplicati/Server/packages.config
#	Duplicati/UnitTest/Duplicati.UnitTest.csproj
2022-02-22 19:04:01 -08:00
Riccardo Paolo Bestetti 528478fda4 Implement exponential backoff for backend errors 2022-01-20 23:22:08 +01:00
Thomas Suckow ecb0249259 dotnet no longer provides a method for a string to hashalgorithm
* Also fix up not diposing of hashers
2021-04-04 11:17:13 -07:00
Thomas Suckow d8ddd6982c Refactor VolumeHash 2021-04-04 08:28:44 -07:00
Thomas Suckow 898193fcef For now, just interrupt since its better than NOP. 2021-04-03 20:54:47 -07:00
Max 3f2eb254c3 buildable again 2020-05-31 14:38:14 +02:00
Max c882953fdd upstream 2020-05-31 13:50:13 +02:00
Kenneth Hsu a42a0a41b6 Remove unnecessary variable assignment. 2020-03-15 09:58:14 -07:00
Kenneth Hsu 7456d12dac Revert "Ensure that IndexVolumeWriter is disposed."
Since a reference to the IndexVolumeWriter is passed to the
FileEntryItem, we should not dispose of it here.

This reverts commit b6123cc156.

This is a potential fix for issue #4130.
2020-03-15 09:53:21 -07:00
Sean Templeton 9739517b0a Fix bandwidth throttling inconsistency
In code the throttling generally works backwards than what one would expect.
The streams that are throttled are the streams that operate on files from the local machine.
This fixes the download throttling not working and the upload throttling applying to
both uploads and downloads.

When doing a Put operation the stream on the local machine is reading from the
local filesystem and hence the upload throttle bytes per second needs to be
applied to the reading of the stream, not the writing.

Similarly when doing a Get operation the download throttle bytes per second needs
to be applied to the writing of the stream.

Fixes #4115
2020-03-04 19:57:48 -06:00
Kenneth Hsu 69005a64f7 Remove unused BackendManager.FlushDbMessages method.
The last reference was removed in revision
8abdf87188.
2020-01-26 10:18:19 -08:00
Kenneth Hsu e241a17af6 Remove unused BackendManager.CreateFolder method.
This was introduced in revision aca4ed95cc
but without any apparent usages.
2020-01-26 10:18:19 -08:00
Kenneth Hsu 7d3d03c06f Remove unused BackendManager.LastException property.
The last reference was removed in revision
8abdf87188.
2020-01-26 10:18:19 -08:00
Kenneth Hsu d847b46716 Remove unused BackendManager.HasDied property.
The last reference was removed in revision
8abdf87188.
2020-01-26 10:18:19 -08:00
Sean Templeton 04662bace1 Write blocklists when compacting files
The list folder was not being written to dindex files when performing a
compact operation. After the data blocks have been moved to a new volume
and the new volume data is finished being written to the new index file,
read the blocklists from the database and write them to the new index
file.
2020-01-19 21:57:08 -06:00
Max 28793ef204 packages update 2019-12-25 18:21:24 +01:00
Max 41a5591532 upstream 2019-12-25 16:34:56 +01:00
Kenneth Hsu 83ac03843d Fix spelling errors in comments.
In doing so, we also normalized some line endings.
2019-12-14 09:52:55 -08:00
drwtsn32x 8f9ec70680 only warn if delete failure is confirmed 2019-11-19 20:28:14 -08:00
Kenneth SkovhedeandGitHub 99d0cb3c57 Merge pull request #3953 from warwickmm/make_fields_readonly
Mark fields that don't need to be reassigned as readonly
2019-10-21 08:36:17 +02:00
Kenneth Hsu 2aa76881a5 Mark fields that don't need to be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2019-10-19 13:59:22 -07:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Kenneth Hsu b6123cc156 Ensure that IndexVolumeWriter is disposed. 2019-09-28 10:33:34 -07:00
Michal Naiman 1bc1e58737 upstream 2019-04-28 13:45:26 +02:00
Sean Templeton b02b19e683 Change Put method name to PutAsync 2019-03-17 18:28:45 -05:00
Sean Templeton 0c122ff550 Change IBackend and IStreamingBackend to return Task for Put() 2019-03-03 21:43:10 -06:00
Kenneth Hsu b7f28aa9f9 Remove empty finally blocks.
Empty finally blocks serve no purpose.  In cases where no exceptions are
caught, we removed the try as well.
2018-12-31 14:00:43 -08:00
Kenneth Hsu 1d57ddd5a6 Flatten AggregateExceptions before referencing InnerException.
The InnerException property of an AggregateException can be another
AggregateException.  By calling Flatten(), we remove inner
AggregateExceptions so that the InnerExceptions property contains all
the original exceptions.  The InnerException property is the first
element of InnerExceptions.
2018-10-13 19:07:49 -07:00
Rune HenriksenandGitHub be7edb580d Merge pull request #3410 from warwickmm/simplify_enumerating_collections
Simplify enumeration of collections
2018-10-07 19:06:28 +02:00
Kenneth Hsu 0c1ac9c489 Replace chained LINQ calls with call to overload with predicate.
This simplifies the code by reducing the number of enumerators created
while also making the code slightly more readable.
2018-10-06 16:20:18 -07:00
Kenneth Hsu d72128ec83 Remove unused method parameters. 2018-10-06 15:09:43 -07:00
Kenneth Hsu 8902da39f2 Undo removal of method parameters.
This should be done on a separate branch for a different pull request.
2018-09-29 10:44:05 -07:00
Kenneth Hsu 9ce1e807c7 Remove unused variables and fields. 2018-09-29 10:41:27 -07:00
Max a22a7a7d24 remove of FasterHashing component 2018-09-09 14:42:40 +02: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
Kenneth Skovhede 9e48de8e01 Merge branch 'master' of github.com:duplicati/duplicati 2018-03-22 08:32:48 +01:00
Kenneth Skovhede e9d477889f Fixed the order of arguments for throttling downloads.
This fixes part of #2890
2018-03-22 08:32:33 +01:00
Kenneth Hsu c00c6fd19b Make fields containing lock objects readonly.
If one of these fields is accidentally reassigned, it's possible for
threads to be oblivious to an existing lock.  By making the fields
readonly, we will be notified at compile-time if we inadvertently
redefine one of these fields.
2018-03-17 19:59:23 -07: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 bd863016fa Added support for returning multiple DNS names for cache invalidation.
Updated most backends to return the actual DNS names for cache invalidation.
2018-02-26 11:37:10 +01:00
Rune Henriksen fc77b476fc changed from NYI to null returns. Added check to skip DNS check if no DNSName is provided 2018-02-21 22:38:01 +01:00
Rune Henriksen 0ba28da948 Added if statement to specifically verify that it's a NameResolutionFailure and not just a WebException 2018-02-20 20:34:09 +01:00
Rune Henriksen ecc586c0f8 added code to attempt to resolve DNS issues on connection failure and implemented DNSName method in WebDav backend handler 2018-02-18 01:30:05 +01:00
vnau 62a7901aca Compression modules refactored to work with streams instead of filenames;
Added unit test to check compression reversibility
2017-12-25 04:12:19 +07:00
Kenneth Hsu 5fb1958ceb Remove redundant calls to ToString. 2017-11-26 15:44:34 -08:00
Kenneth Skovhede 8bbe04f623 Fixed a case where entering an invalid value for the --number-of-retries or --retry-delay options would crash the uploader thread and bring down the server.
This fixes #2834
2017-10-30 16:12:44 +01:00
Tyler Gill 38883285ee Change IBackend.List() to return IEnumerable instead of List
By changing to IEnumerable, it is possible to iterate only a portion of the list, which is useful when not all entries are needed (e.g., when testing a connection).
All existing backends have been updated, and any which were able to be changed to yield return results in a straightforward way now do.
Many backends had a try/catch in the List() method. Due to the fact that yield returns can't be placed within a try/catch block, these have been refactored to either scope the try/catch to the parts that (should) be the only places throwing exceptions, so that exceptions are still caught and handled.
Note that lazy evaluation may cause some changes in behavior - exceptions that were previously thrown at the point of invokation of List() may now be thrown while it is being enumerated.
I believe this will not be problematic though, as the only well-known exception seems to be FolderMissingException, which should be thrown by Test(), but TestList() attempts to enumerate the list to force this exception.
Any places that require the legacy behavior can get it by simply converting the lazy enumerable to a List()
2017-09-25 23:17:45 -06:00
Kenneth Skovhede 6d401fbd8d Changed all hash algorithms to use the Cng version.
This fixes #2621
2017-09-20 09:58:43 +02:00