From f66682ad845b1d34441d1d47762b8172fefa0a12 Mon Sep 17 00:00:00 2001 From: Markus Duft Date: Wed, 13 Dec 2023 08:56:19 +0100 Subject: [PATCH] Clear manifest list cache before pruning. The manifest list cache *should* be updated timely and correctly now after recent changes. Since pruning is not performance critical, we avoid any issues right away beforehand just to be sure by clearing it. Bug: WPL-2473 Change-Id: Ieebc4725d78f945a3edd996a3b9b8e6a8c8ba512 --- bhive/src/main/java/io/bdeploy/bhive/op/PruneOperation.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bhive/src/main/java/io/bdeploy/bhive/op/PruneOperation.java b/bhive/src/main/java/io/bdeploy/bhive/op/PruneOperation.java index 96d44b581..8f6eb7f46 100644 --- a/bhive/src/main/java/io/bdeploy/bhive/op/PruneOperation.java +++ b/bhive/src/main/java/io/bdeploy/bhive/op/PruneOperation.java @@ -52,6 +52,9 @@ public SortedMap call() throws Exception { // 3) Upon completion, existing trasactions will block removal of the markers until the root is unlocked. execute(new LockDirectoryOperation().setDirectory(getMarkerRoot())); + // make sure there is no outdated information + getManifestDatabase().invalidateCaches(); + SortedSet all; try { // read existing manifests also inside the lock, so we are sure that the existing