diff --git a/Duplicati/Library/Main/Operation/Restore/BlockManager.cs b/Duplicati/Library/Main/Operation/Restore/BlockManager.cs index 7df17ccfb..e9e351f51 100644 --- a/Duplicati/Library/Main/Operation/Restore/BlockManager.cs +++ b/Duplicati/Library/Main/Operation/Restore/BlockManager.cs @@ -106,9 +106,14 @@ namespace Duplicati.Library.Main.Operation.Restore /// The options for the restore. /// private readonly Options m_options; - - private MemoryCacheEntryOptions m_entry_options = new(); - private ConcurrentDictionary m_active_readers = []; + /// + /// The cache eviction options. Used for registering a callback when a block is evicted from the cache. + /// + private readonly MemoryCacheEntryOptions m_entry_options = new(); + /// + /// Dictionary to keep track of how many active readers are accessing each block. On eviction, the byte[] buffer can only be returned to the ArrayPool if there are no active readers. + /// + private readonly ConcurrentDictionary m_active_readers = []; /// /// Initializes a new instance of the class. @@ -159,7 +164,6 @@ namespace Duplicati.Library.Main.Operation.Restore /// the VolumeDownloader will be notified. /// /// The block request to check. - /// public async Task CheckCounts(BlockRequest blockRequest) { long error_block_id = -1; @@ -269,8 +273,8 @@ namespace Duplicati.Library.Main.Operation.Restore /// removed, the requester will be given a `Task` that will be /// completed when the block is available. /// - /// - /// + /// The block request related to the value. + /// The byte[] buffer holding the block data. public void Set(BlockRequest blockRequest, byte[] value) { m_block_cache.Set(blockRequest.BlockID, value); @@ -359,6 +363,7 @@ namespace Duplicati.Library.Main.Operation.Restore /// accessing the cache for the blocks, and writing the resulting /// blocks back to the `FileProcessor`. /// + /// The named channels for the restore operation. /// The database holding information about how many of each block this restore requires. /// The restore options. /// The channels for reading block requests from the `FileProcessor`.