Commit Graph
45 Commits
Author SHA1 Message Date
Fish 3cf01b7297 Advance the progress bar when files are skipped. Fixes #3407.
According to the current implementation, the progress bar does not advance
when files are skipped by FilePreFilterProcess. This causes users'
confusion since the web frontend will get stuck at a certain stage for a
long time. This commit addresses this issue.
2019-11-03 21:34:21 -07: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
Sean Templeton ac08aa2fb1 Dynamically throttle and track the progress of concurrent uploads
Changed AddBackendEvent() in ResultClasses to allow the option to not update
the backend progress. This allows the  BackendUploader to log the act of starting
an upload without changing the backend progress. The backend progress is now
handled by a new class, FileProgressThrottler, which will determine the transfer
rate of all uploads currently in progress.

This class also handles throttling the upload streams. The algorithm will try
to decrease or increase the streams throttle rates as appropriate by changing
the value based on the over/under amount or based on a percentage to prevent
throttling one stream directly to zero.
2019-03-05 21:25:35 -06:00
Sean Templeton 05c3f4808c Move encrypting, hashing, and creating index volumes out of BackendUploader
Encrypting, hashing, and creating index volumes are now done
in the DataBlockProcessor and the SpillCollectorProcess. This allows
uploads to always be transferring data and not have to stop to create
a file, encrypt data, etc.
2019-03-03 21:41:09 -06:00
Sean Templeton 4f4529a88a Move upload related code from BackendHandler to BackendUploader
As the BackendUploader is in charge of uploads the code has been moved
there to centralize the responsibility and prepare for parallel uploads.
2019-03-03 21:35:09 -06: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 1c8bb276b4 Allow tasks to complete on any thread when context is irrelevant.
When the code following the await can be executed on any thread, it's
recommended to use ConfigureAwait(false) to avoid unnecessary context
switching and potential deadlocks.
2018-09-19 16:57:17 -07:00
Rune HenriksenandGitHub b8e53cc839 Merge branch 'master' into remove_unnecessary_async 2018-09-04 21:27:11 +02:00
Kenneth Skovhede b55893ec02 Rewrote the SingleRunner class to use a single mutex instead of the overly complex bag-of-tasks method.
This simplifies things and speeds up database query queuing, at the expense of not guaranteeing that the same thread will access the database, but just guaranteeing single threaded database access.
2018-08-07 09:52:18 +02:00
Kenneth Hsu 1a2ee3a5ef Simplify return type of synchronous methods.
Since these methods no longer have the async modifier, they do not need
to return a Task, and do not need to be awaited.
2018-07-04 15:35:14 -07:00
Kenneth Hsu 6c38651f19 Rename methods to clarify their synchronous behavior.
Since these methods no longer have the async modifier, we should not
include 'Async' in their names.
2018-07-04 15:35:14 -07:00
Kenneth Hsu 5e3f15ada4 Remove async modifier from methods that lack await.
A method marked async that does not use await will run synchronously.
By removing the async modifiers, we make it more explicit that these are
synchronous methods.  This also addresses some compiler warnings, and
avoids the creation of the state machine used to handle asynchronous
operations.
2018-07-04 15:35:09 -07:00
Kenneth Skovhede 166ef2976b Merge branch 'feature/cleanup_temp_files'
# Conflicts:
#	Duplicati/Library/Main/Operation/Common/BackendHandler.cs
2018-06-28 12:17:22 +02:00
Kenneth Hsu 54c4f9224d Allow tasks to complete on any thread when context is irrelevant.
When the code following the await can be executed on any thread, it's
recommended to use ConfigureAwait(false) to avoid unnecessary context
switching and potential deadlocks.
2018-06-21 19:28:27 -07:00
Kenneth Skovhede be6093b7a6 Fixed unecrypted temporary files stored for upload were not removed. 2018-06-20 10:11:56 +02:00
Kenneth Skovhede 729baf76e6 Fixed registering the newly created index volume after upload has completed 2018-06-13 21:43:06 +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 Skovhede d042e70ca2 Changed the returned IEnumerable values to be fully created, which avoids issues with locks and transactions being prematurely released.
This might help with #3202
2018-06-04 11:56:54 +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 c50721e0c4 Added input validation to the IndexVolumeCreator to make sure it does not create invalid temporary lists 2018-05-09 17:37:30 +02:00
Kenneth Skovhede 3081447271 Added an on-the-fly index builder to avoid querying the database for each volume 2018-04-30 14:04:30 +02:00
Kenneth Skovhede 79f7b22e0f Merge branch 'master' into concurrent_processing
Changed a few things on the way, removing the log process

# Conflicts:
#	Duplicati/Library/Main/Controller.cs
#	Duplicati/Library/Main/Database/ExtensionMethods.cs
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/Operation/FilelistProcessor.cs
#	Duplicati/Library/Main/Operation/PurgeBrokenFilesHandler.cs
#	Duplicati/Library/Main/Operation/TestFilterHandler.cs
#	Duplicati/Library/Main/Options.cs
#	Duplicati/Library/Main/ResultClasses.cs
#	Duplicati/UnitTest/BasicSetupHelper.cs
2018-04-11 23:02:47 +02:00
Kenneth Skovhede 75bf6857c1 Merge branch 'master' into concurrent_processing
# Conflicts:
#	.travis.yml
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/ResultClasses.cs
#	Duplicati/Library/Main/Volumes/VolumeWriterBase.cs
#	Duplicati/Library/Utility/TempFile.cs
2018-01-20 15:02:41 +01:00
Kenneth Skovhede 860924bb62 Updated main functions to new CoCoL library 2017-09-20 21:03:24 +02:00
Kenneth Skovhede 683b04741d Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Operation/BackupHandler.cs

Manually fixed the HashAlgorithmHelper case
2017-09-20 13:56:37 +02:00
Kenneth Skovhede bc6e32d049 Updated the new backend handler to support the same features as the previous: throttle, error message, and deleteGraceTime. 2017-09-19 14:24:59 +02:00
Kenneth Skovhede 21b7a98dc3 Implemented the blocking flag in the uploader 2017-09-19 14:18:54 +02:00
Kenneth Skovhede 14f1c58c64 Improved shutdown to avoid exceptions being masked by errors that occur during shutdown 2016-04-06 21:16:34 +02:00
Kenneth Skovhede 850c8e432b Fixed a spelling error 2016-03-14 09:38:19 +01:00
Kenneth Skovhede a3f2b39d23 Implemented handling of pause/stop/abort in the concurrent code.
Implemented the dry-run feature for backups.
2016-02-29 21:52:11 +01:00
Kenneth Skovhede 35f9a70b3d Fixed resetting the backend 2016-02-25 23:33:55 +01:00
Kenneth Skovhede 537fe20838 Added a lot of comments.
Fixed a few issues that caused parallel uploads.
Fixed the use of the encryption module so the encryption module is not re-used for multiple jobs.
2016-02-25 19:15:51 +01:00
Kenneth Skovhede 20f7b42945 Fixed channels to use type-safe initializations.
Updated logging channel to use a wrapper for later early-filter optimizations.
Various bug fixes and optimizations.
2016-02-24 23:48:42 +01:00
Kenneth Skovhede 0eba4bf098 Improved debugging for sql commands 2016-02-24 23:45:32 +01:00
Kenneth Skovhede 5bd03adc96 Added consistency check when building the index file 2016-02-23 20:58:23 +01:00
Kenneth Skovhede 37d04b7b19 More work on making the backup process use the concurrent constructs 2016-02-22 22:40:27 +01:00
Kenneth Skovhede 3ff2f1eb98 The concurrent processing now seems to work, at least in the base case.
Rewrote the handling of index volumes to create them on-demand instead of in-advance.
This makes it much simpler to handle upload failures.
2016-02-22 21:27:12 +01:00
Kenneth Skovhede 8abdf87188 More cleanup and fixes for the concurrent processing 2016-02-20 15:06:29 +01:00
Kenneth Skovhede 371965d88c Work towards using the processed based concurrent execution flow 2016-02-19 00:02:38 +01:00
Kenneth Skovhede c297ca58dd Fixed the duplicate hash computation solved in #1584 2016-02-18 22:39:47 +01:00
Kenneth Skovhede 086547e655 Implemented the missing details for the concurrent setup, it now compiles 2016-02-18 17:20:52 +01:00
Kenneth Skovhede ec877696b0 More work on concurrent processing 2016-02-18 16:46:53 +01:00
Kenneth Skovhede 01c3b3f5c0 More work on a concurrent implementation of the backup process 2016-02-09 09:17:31 +01:00