From 537ee9c4cb5bc4445b6909ccd68e2c5c7e202de9 Mon Sep 17 00:00:00 2001 From: Carl Johnsen Date: Sun, 10 Aug 2025 07:39:22 +0200 Subject: [PATCH] Final eviction should always happen, and some caching is always needed in the new restore flow --- .../Library/Main/Operation/Restore/VolumeManager.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Duplicati/Library/Main/Operation/Restore/VolumeManager.cs b/Duplicati/Library/Main/Operation/Restore/VolumeManager.cs index 99a630ddc..c25674399 100644 --- a/Duplicati/Library/Main/Operation/Restore/VolumeManager.cs +++ b/Duplicati/Library/Main/Operation/Restore/VolumeManager.cs @@ -191,11 +191,8 @@ namespace Duplicati.Library.Main.Operation.Restore { case BlockRequestType.CacheEvict: { - if (cache_max > 0) - { - Logging.Log.WriteExplicitMessage(LOGTAG, "VolumeRequest", "Evicting volume {0} from cache by request", request.VolumeID); - handle_evict(request.VolumeID); - } + Logging.Log.WriteExplicitMessage(LOGTAG, "VolumeRequest", "Evicting volume {0} from cache by request", request.VolumeID); + handle_evict(request.VolumeID); } break; case BlockRequestType.DecompressAck: @@ -222,7 +219,8 @@ namespace Duplicati.Library.Main.Operation.Restore else { // Check if downloading another volume would exceed cache limits. - if ((cache.Count + in_flight_downloads.Count) >= cache_max) + // Cache_max = 0 auto evicts when all of the requests have been ack'ed. + if (cache_max > 0 && (cache.Count + in_flight_downloads.Count) >= cache_max) { Logging.Log.WriteVerboseMessage(LOGTAG, "VolumeRequest", null, "Evicting volume"); // TODO switch based of the eviction strategy.