]> source.dussan.org Git - jgit.git/commit
Split note leaf buckets at 256 elements 54/1854/4
authorShawn O. Pearce <spearce@spearce.org>
Fri, 5 Nov 2010 01:56:40 +0000 (18:56 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 12 Nov 2010 22:01:28 +0000 (14:01 -0800)
commit2b0df15f7f1bdcfc41349c478319fad50158c183
tree524584b9c728a4961791c481eba79393b0a2719e
parent3728918d72e3ff2e7540becadf719957d8d75d70
Split note leaf buckets at 256 elements

Leaf level notes trees are split into a new fan-out tree if an
insertion occurs and the tree already contains >= 256 notes in it.

The splitting may occur multiple times if all of the notes have the
same prefix; in the worst case this produces a tree path such as
"00/00/00/00/00/00/00/00/00/00/00/00/00/00/00/00/00/00/00/be" if all
of the notes begin with zeros.

Change-Id: I2d7d98f35108def9ec49936ddbdc34b13822a3c7
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/notes/NoteMapTest.java
org.eclipse.jgit/src/org/eclipse/jgit/notes/FanoutBucket.java
org.eclipse.jgit/src/org/eclipse/jgit/notes/InMemoryNoteBucket.java
org.eclipse.jgit/src/org/eclipse/jgit/notes/LeafBucket.java