Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Parker2017-05-18 08:30:14 +0000
committerTerry Parker2017-05-18 22:25:21 +0000
commitc46c720e99baa081bff0dd7bcc1ae8ca48b5e3d1 (patch)
tree13225554fd85d707bb2e361d820b580759535e88 /org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
parent69d5e89e99707119837eb1f025ee2c8d6d376996 (diff)
downloadjgit-c46c720e99baa081bff0dd7bcc1ae8ca48b5e3d1.tar.gz
jgit-c46c720e99baa081bff0dd7bcc1ae8ca48b5e3d1.tar.xz
jgit-c46c720e99baa081bff0dd7bcc1ae8ca48b5e3d1.zip
Exclude refs/tags from bitmap commit selection
Commit db77610 ensured that all refs/tags commits are added to the primary GC pack. It did that by adding all of the refs/tags commits to the primary GC pack PackWriter's "interesting" object set. Unfortunately, all commit objects in the "interesting" set are selected as commits for which bitmap indices will be built. In a repository like chromium with lots of tags, this changed the number of bitmaps created from <700 to >10000. That puts huge memory pressure on the GC task. This change restores the original behavior of ignoring tags when selecting commits for bitmaps. In the "uninteresting" set, commits for refs/heads and refs/tags for unannotated tags can not be differentiated. We instead identify refs/tags commits by passing their ObjectIds as a new "noBitmaps" parameter to the PackWriter.preparePack() methods. PackWriterBitmapPreparer.setupTipCommitBitmaps() can then use that "noBitmaps" parameter to exclude those commits. Change-Id: Icd287c6b04fc1e48de773033fe432a9b0e904ac5 Signed-off-by: Terry Parker <tparker@google.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
index c817dc3d7b..9b97eb4ff4 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
@@ -711,7 +711,7 @@ public class PackWriterTest extends SampleDataRepositoryTestCase {
}
ObjectWalk ow = walk.toObjectWalkWithSameObjects();
- pw.preparePack(NullProgressMonitor.INSTANCE, ow, want, have);
+ pw.preparePack(NullProgressMonitor.INSTANCE, ow, want, have, NONE);
String id = pw.computeName().getName();
File packdir = new File(repo.getObjectsDirectory(), "pack");
File packFile = new File(packdir, "pack-" + id + ".pack");

Back to the top