Skip to content

Commit

Permalink
Clear manifest list cache before pruning.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mduft committed Dec 13, 2023
1 parent eaa6b9e commit f66682a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bhive/src/main/java/io/bdeploy/bhive/op/PruneOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public SortedMap<ObjectId, Long> 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<ObjectId> all;
try {
// read existing manifests also inside the lock, so we are sure that the existing
Expand Down

0 comments on commit f66682a

Please sign in to comment.