aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNasser Grainawi <quic_nasserg@quicinc.com>2025-06-19 18:03:11 -0700
committerNasser Grainawi <quic_nasserg@quicinc.com>2025-06-19 18:03:11 -0700
commit3f3f3b5a6d474da5dadc60a80d2fc09a0e9872fe (patch)
treec0bfea4a628fbf78a1f4583c297eca2d4504746e
parent1c72895097f290b1fdea87bb4b62fb3517e5f14f (diff)
downloadjgit-stable-6.10.tar.gz
jgit-stable-6.10.zip
Fix: Close the "preserved" PackDirectorystable-6.10
This has been missing since the feature was first added in commit 6167641834e28f8ad322f8fde60866b339bfb7fe. It's possible we could be more aggressive and close soon after attempting to get an object from the preserved packs, but for concurrent misses that might cause thrashing. More likely it would be safe to attempt closing after successfully restoring a preserved pack. A follow up change should attempt that. Change-Id: I87d61007bcc3d03fc86bd18465ca66a2e6f697a1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
index 9f21481a13..3a6de4e8e2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
@@ -200,6 +200,7 @@ public class ObjectDirectory extends FileObjectDatabase {
loose.close();
packed.close();
+ preserved.close();
// Fully close all loaded alternates and clear the alternate list.
AlternateHandle[] alt = alternates.get();