Commit Graph
123 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 SkovhedeandGitHub 579f9911d5 Merge pull request #3938 from warwickmm/bugfix/wrong_dblock_in_dindex
Ensure that dindex references correct dblock file after renames
2019-10-19 14:19:11 +02:00
Kenneth Hsu 1c492647ae Rename method parameter for consistency. 2019-10-05 11:25:22 -07:00
Kenneth Hsu 0cdc5b9159 Ensure that dindex contains correct dblock file after renames.
When support for parallel uploads was implemented, we overlooked a case
where a failed put of a dblock file is retried with a different
filename.  In this case, an instance of TemporaryIndexVolume was created
in the DataBlockProcessor or SpillCollectorProcess prior to the
attempted put.  The put would fail, and then retried with a different
filename.  While the Remotevolume table in the database would reflect
the new filename, the TemporaryIndexVolume still contained a reference
to the old dblock filename.  This would cause issues in direct restores,
etc., when the referenced dblock file could not be found.

Now, the TemporaryIndexVolume is only created after the dblock put has
completed.

This addresses issue #3932.
2019-10-05 10:46:39 -07:00
Kenneth Hsu 614ccaf79d Convert duplicated static methods into instance method. 2019-10-04 21:37:33 -07:00
Kenneth Hsu 8d7c6c6e21 Ensure that filelist is always written to dlist files.
This fixes a regression introduced around revisions e0899a2a91 ("add
method to add the filelist file") and 3b5af1cf01 ("add method to add
filelist file"), where the filelist was not written by all usages of the
FilesetVolumeWriter.  Previously, one would have to invoke
AddFilelistFile with each usage.  Now, we simply do so when the
FilesetVolumeWriter is closed.

We also modified the UploadSyntheticFilelist so that the usage of the
FilesetVolumeWriter is contained in a using statement, which will ensure
that it is disposed.

This fixes issue #3924.
2019-09-27 20:35:06 -07:00
BlueBlock 3b5af1cf01 add method to add filelist file
This is part of correcting the way the dlist zip file is created. We now have a method to take the memorystream and put the file into dlist.
2019-09-10 13:12:21 -04:00
BlueBlock 0685e61285 method refactored to include actual IsFullBackup state 2019-09-10 12:56:04 -04:00
BlueBlock efb24d085e Merge remote-tracking branch 'upstream/master' into fix-stop-after-current-file 2019-08-31 14:12:14 -04:00
BlueBlock 42342f30be move new stream to Utility 2019-08-27 23:48:07 -04:00
BlueBlock c07411acb7 resolve codacy issues 2019-08-27 14:34:34 -04:00
BlueBlock 146b98ae4c initial fix for issue1400 2019-08-27 14:09:43 -04:00
BlueBlock 08e2c18185 add handling of a partial backup
- add backup state to DB table 'fileset' (job database upgrade to version 10)
- modify the Restore page dropdown to display if a backup is "partial"
- modify retention logic to remove partial backups only when the next recent full-backup has been removed
2019-08-05 20:14:05 -04:00
BlueBlock e52cef304b codacy fixes applied 2 2019-08-02 13:54:30 -04:00
BlueBlock 4407d24f5d codacy fixes applied 2019-08-02 13:48:50 -04:00
BlueBlock 14e6068a5f Also stop the file enum process when the user has cancelled
The file enumeration process should also stop when the user has cancelled the operation.
2019-07-24 15:58:44 -04:00
BlueBlock b416c6c78b fix - do not throw exception in case where user has asked to cancel 2019-07-24 15:02:30 -04:00
BlueBlock ba1c9bac21 resolve codacy issues 2019-07-23 11:14:06 -04:00
BlueBlock 29a1a7c618 fix stop after the current file
'stop after upload' is now
stop after the current file' and the operation will cleanly allow the current file to complete.
2019-07-23 10:35:33 -04:00
Kenneth Hsu 7fd815b56e Simplify comment. 2019-07-06 15:34:46 -07:00
Kenneth Hsu c149792973 Dispose Backends after upload operations.
This addresses issue #3808.
2019-07-06 15:33:59 -07:00
Kenneth Hsu bfa3c120e5 Make Worker implement IDisposable.
This will allow the underlying Task and Backend to be disposed.
2019-07-06 12:50:37 -07:00
Kenneth Hsu 914203c071 Reorder methods alphabetically. 2019-04-06 21:42:01 -07:00
Kenneth Hsu e3c16c58fd Set flushed result after all tasks have completed. 2019-03-31 19:41:09 -07:00
Kenneth Hsu be21e09db1 Cancel the FlushBackend task if upload exception occurs.
This should avoid the problem of something awaiting a
FlushBackend.LastWriteSizeAync task that may never complete.
2019-03-31 19:41:09 -07:00
Kenneth Hsu 9a80e422e9 Remove unnecessary try-finally.
The only code in the finally block was to set the result of the
FlushRequest if the completed task was not faulted.  This could be done
without the try-finally.
2019-03-31 19:38:42 -07:00
Kenneth Hsu fdb2c6788c Ensure that failed put operations throw exception.
The FlushBackend method uses Task.WhenAny to await the first completion
of the uploader task or the flush request.  Since the uploader was
setting the status of the flush request in the finally block, the flush
request would complete first when an exception was thrown, causing the
uploader's exception to be unobserved.  To resolve this,  we check that
the uploader's status is not faulted before setting the flush request
status.

This addresses issue #3673.
2019-03-31 19:38:40 -07:00
Sean Templeton 8be3203aa2 Fix index files not being created for full dblock files
As part of the parallel upload changes a bug slipped in where a check was
being made if the index volume writer exists before creating said index
volume writer. Fixed by changing the test to check if the temporary index
volume exists and then creating the writer for the index file.
2019-03-30 19:55:36 -05:00
Kenneth Hsu da4dabe838 Fix typo in async property name. 2019-03-28 20:53:55 -07:00
Sean Templeton b02b19e683 Change Put method name to PutAsync 2019-03-17 18:28:45 -05:00
Sean Templeton 19c1c908df Check upload throttle speed every 2 seconds
The upload throttle speed was being checked on average once every
5 milliseconds.

Changed a few variable names.
2019-03-13 21:51:06 -05:00
Sean Templeton cc3e94fece Fix code review comments and other minor changes
- Rename indexVolume to indexVolumeWriter in DataBlockProcessor to reduce
confusion.

- When flushing the remaining uploads, check the tasks for exceptions in
completion order rather than waiting for them all at once. If there is an
exception all other uploads are cancelled anyway.

- Remove setting the operation progress as Backup_WaitForUpload in the
BackendUploader since the BackupHandler sets it.

- Use an exception filter in BackendUploader.

- Use Options property MaxUploadPrSecond instead of getting the raw value.
2019-03-13 21:51:06 -05:00
Sean Templeton 8bd4b825c8 Fix several Codacy issues 2019-03-13 21:51:05 -05:00
Sean Templeton 61f511c087 Properly catch exceptions from an upload and cancel all other uploads
If a backend throws an exception while uploading, cancel other uploads and
throw an exception from the BackendUploader. Exceptions from cancelled
uploads are caught and not thrown so as to not spam the user with useless
information.
2019-03-13 21:51:02 -05: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 12b15c09c8 Add asynchronous-concurrent-upload-limit option
This new option limits the number of concurrent uploads allowed when
performing asynchronous uploads. The default value is 4.
2019-03-05 21:25:35 -06:00
Sean Templeton 0c122ff550 Change IBackend and IStreamingBackend to return Task for Put() 2019-03-03 21:43:10 -06:00
Sean Templeton 3de04da39e Run each upload on a separate thread
Added a small Worker class, private to the BackendUploader, to track the
upload tasks and the backend for each task.
2019-03-03 21:43:00 -06:00
Sean Templeton 1029d99e10 Simplify BackendUploader and remove unnecessary code 2019-03-03 21:42:58 -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
Kenneth Hsu 224a895975 Fix spelling error in log message id. 2019-02-19 20:23:07 -08:00
Rune HenriksenandGitHub f5f353fe19 Merge branch 'master' into feature/fix_path_storage2 2019-01-25 23:37:57 +01:00
Kenneth Hsu b5d9451b33 Remove redundant casts. 2019-01-21 19:30:52 -08:00
Kenneth Hsu aab3afd4a7 Fix class reference in XML documentation. 2018-11-18 17:23:01 -08:00
verhoek b2cc18426c Renamed Library.IO to Library.Common.IO.
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
2018-11-02 21:34:07 +01:00
verhoek 40dc6da81d Created separate package for io wrapper. 2018-10-25 20:01:55 +02: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 e16ab43d86 Fix typo in log message id. 2018-10-15 21:14:59 -07:00
Kenneth Hsu d72128ec83 Remove unused method parameters. 2018-10-06 15:09:43 -07:00