Commit Graph
162 Commits
Author SHA1 Message Date
Carl Johnsen dbe413d889 Fixed the restore BlockManager block counting logic 2025-02-28 10:26:07 +01:00
Carl Johnsen 97df02c57c Fixed missing docstrings 2025-02-27 14:48:08 +01:00
Carl Johnsen b9eaa224b8 Renamed variables in VolumeDecompressor 2025-02-27 14:46:04 +01:00
Carl Johnsen 6ef151f4af Cleaned up FileProcessor 2025-02-27 14:45:05 +01:00
Carl Johnsen a539af58ca Removed unused code from FileLister 2025-02-27 14:44:54 +01:00
Carl Johnsen 2ebb021174 Cleaned up BlockManager 2025-02-27 14:40:29 +01:00
Carl Johnsen 2fae2d510e Removed old block counters from BlockManager 2025-02-27 14:16:06 +01:00
Carl Johnsen 260786a91a Merge branch 'feature/restore-buffer-size-option' into performance/restoreopt2 2025-02-27 14:03:01 +01:00
Carl Johnsen 038e78ad06 The block cache is now always present, as it keeps track of blocks. In case of a cache size 0, every Set() will trigger an evict. 2025-02-27 11:17:11 +01:00
Carl Johnsen bdfdc7e92a MemoryCache evict now correctly handles the ArrayPool 2025-02-27 10:54:47 +01:00
Carl Johnsen 7109155127 Additional block count reporting of the block manager 2025-02-26 16:11:13 +01:00
Carl Johnsen 0e6e1bcbd8 Currently, the block cache cannot compact while using the arraypool, as this doesn't properly return the buffers to the pool 2025-02-26 16:10:51 +01:00
Carl Johnsen 6873162002 Additional internal profiling resolution 2025-02-26 16:09:23 +01:00
Carl Johnsen a49c66bcb5 Added caching of localrestoredatabase data 2025-02-25 17:42:30 +01:00
Carl Johnsen bf3a26ffcd Added more internal profiling timers to the FileProcessor to get more high-resolution profiling 2025-02-25 16:49:46 +01:00
Carl Johnsen e773907eed Changed from allocating a new byte[] buffer in the decompressor to use the Buffers.ArrayPool 2025-02-25 16:45:55 +01:00
Carl Johnsen d7b8d13bc0 VolumeDecryptor and VolumeManager were unnecessarily sending around and keeping track of disposed encrypted volumes 2025-02-25 16:39:28 +01:00
Carl Johnsen 5c7a933722 FileLister did not report its internal profling properly 2025-02-25 16:37:49 +01:00
Carl Johnsen b62a1f7600 Added missing comments in filelister 2025-02-25 16:36:30 +01:00
Carl Johnsen b86794791b Reallocating byte[] buffer takes up too long time if done for each file 2025-02-25 16:35:46 +01:00
Carl Johnsen c5ebf4fa71 Added the restore channel depth option 2025-02-25 16:19:04 +01:00
Carl Johnsen 9919d86e9b Updated VolumeDownloader to use the new BackendManager.GetDirectAsync() method 2025-02-19 16:12:42 +01:00
Carl Johnsen 2c06820281 Made the BackendManager.GetOperations' decryption methods static and public so the restores VolumeDecryptor can use the same code. 2025-02-19 16:09:32 +01:00
Carl Johnsen a0d5096ebc Reworked the "Volume loop" of the restore network to handle Backends themselves, rather than using the BackendManager.
This allows for tighter control over which process performs which action, allowing them more easily to run in parallel.
2025-02-18 09:25:20 +01:00
Carl Johnsen 17e2c0b9cf Added ConfigureAwait(false) 2025-02-18 09:20:28 +01:00
Carl Johnsen 93756cd74b Whitespace fixes 2025-02-18 09:17:08 +01:00
Carl Johnsen 6600e418a7 Fixed a bug during profile logging 2025-02-18 09:14:17 +01:00
Carl Johnsen 043b9230b5 VerifyLocalBlocks opened file in incorrect mode, and the target file may not exist. 2025-02-10 13:44:02 +01:00
Carl Johnsen 82019ea28e Modified VerifyTargetBlocks to not evict block from cache. It is now handled outside, in case of file name retargeting when overwrite is false. 2025-02-10 13:42:27 +01:00
Carl Johnsen 0b3ff33716 Moved retire on exception to final, so regardless of how the FileProcessor exits, it retires the channels. 2025-02-10 12:38:24 +01:00
Carl Johnsen 3b9fc188e1 Retire block request and response on exception in FileProcessor 2025-02-10 12:34:44 +01:00
Carl Johnsen 259322f0d9 CopyOldTargetBlocksToNewTarget was made async 2025-02-10 12:34:16 +01:00
Carl Johnsen 6e2f8156f8 VerifyLocalBlocks should only perform checks when the target differs from the original. 2025-02-10 12:33:45 +01:00
Carl Johnsen dbd3520d9c Formatting 2025-02-10 12:18:16 +01:00
Kenneth SkovhedeandGitHub d99f74ed94 Rewrite the backend manager. (#5896)
* Rewrite the backend manager.

This creates a new more logic backend manager that handles all backend operations.

For each top-level operation, there is now a single backend manager instance that is passed to sub-commands.

The internals of the backend manager are now rewritten to use async logic instead of threading.

The design uses a single task runner that dispatches operations and honors concurrent settings and limits from one place.

The logic for each operation has been moved into a separate files/classes to make it easier to understand each operation.

This fixes #5804

* Fixed a few issues with not awaiting tasks

* Fixed not creating empty databases

* Fixed an issue with hashes not being recorded on download

* Reworked the download logic to avoid attempting to decrypt the file if it has been modified.

* Review fixes

* Renamed db collector to better reflect the purpose.

* Review fixes
2025-01-28 08:54:50 +01:00
Kenneth SkovhedeandGitHub 997891525a Updated license-updater to update csproj files (#5898)
* Updated license-updater to update csproj files

* License updates
2025-01-22 21:04:19 +01:00
Carl Johnsen fe7cb13fde Fixed issue with stream not being open in the correct mode during restore 2025-01-17 12:27:05 +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
Carl Johnsen 46b05b94ef Limit file name conflict attempts to 100 and log an error if exceeded 2025-01-06 16:01:53 +01:00
Carl Johnsen 6f263ad874 Added a note about potential memory consumption of restores FileProcessor 2025-01-06 16:00:11 +01:00
Carl Johnsen 284b14b72f Merge branch 'master' into bugfix/restore-overwrite 2025-01-06 14:43:03 +01:00
Carl Johnsen 88846251b1 Restoring a symlink that already exists triggers an overwrite of the file, which should count towards number of files restored. 2025-01-06 08:14:32 +01:00
Carl Johnsen 1bea0f3696 Restored empty files should count towards the restoration file count. 2025-01-05 12:46:08 +01:00
Carl Johnsen 4cd565d592 Added handling of already restored timestamp-retargeted files 2025-01-05 12:09:38 +01:00
Carl Johnsen b759b4564d Added docstrings to new functions 2025-01-05 12:09:04 +01:00
Carl Johnsen eb64320a49 Changed the reporting of restored files to match the legacy restore's reporting. 2025-01-05 11:51:52 +01:00
Carl Johnsen 637bfcefc8 Forgot to check whether the file exists 2025-01-05 11:25:19 +01:00
Carl Johnsen eba477c271 Added handling of the 'overwrite' option in the new restore flow 2025-01-05 10:44:08 +01:00
Carl Johnsen f76bf90e68 Added additional dry run logging 2025-01-05 10:43:23 +01:00
Carl Johnsen 8e92754efd VerifyLocalBlocks now keeps track of internally verified blocks for logging 2025-01-05 10:43:01 +01:00