]> source.dussan.org Git - jgit.git/commitdiff
Don't close ObjectDatabase after parsing pack 23/3923/1
authorShawn O. Pearce <spearce@spearce.org>
Fri, 15 Jul 2011 23:28:26 +0000 (16:28 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 27 Jul 2011 17:00:41 +0000 (10:00 -0700)
The cached object databases should not require a close to release
their cached resources. Most object databases just return their
own reference for newCachedDatabase(), so a close() here kills
the real database's internal caches, and possibly underlying files,
resulting in poor performance for the callers of PackParser like
ReceivePack or FetchProcess trying to then go look up objects that
were just parsed, or that current references point to.

Change-Id: Ia4a239093866e5b9faf82744f729fb73f4373f1a
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java

index 4bbe3a00487361f3a4b8aa898f1fb9213737d78c..03370034b265b857b6775efd91e4a00613b7a995 100644 (file)
@@ -511,7 +511,6 @@ public abstract class PackParser {
                                inflater.release();
                        } finally {
                                inflater = null;
-                               objectDatabase.close();
                        }
                }
                return null; // By default there is no locking.