From 3f3f3b5a6d474da5dadc60a80d2fc09a0e9872fe Mon Sep 17 00:00:00 2001 From: Nasser Grainawi Date: Thu, 19 Jun 2025 18:03:11 -0700 Subject: Fix: Close the "preserved" PackDirectory 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 --- .../src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java | 1 + 1 file changed, 1 insertion(+) (limited to 'org.eclipse.jgit/src') 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(); -- cgit v1.2.3