jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1526768 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MapRecord.java
Date Fri, 27 Sep 2013 01:46:32 GMT
Author: jukka
Date: Fri Sep 27 01:46:31 2013
New Revision: 1526768

URL: http://svn.apache.org/r1526768
Log:
OAK-1031: SegmentMK: Fewer segment lookups

A little bit less ugly hack

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MapRecord.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MapRecord.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MapRecord.java?rev=1526768&r1=1526767&r2=1526768&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MapRecord.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/MapRecord.java
Fri Sep 27 01:46:31 2013
@@ -23,8 +23,6 @@ import static com.google.common.collect.
 import static java.lang.Integer.highestOneBit;
 import static java.lang.Integer.numberOfTrailingZeros;
 
-import java.nio.ByteBuffer;
-import java.util.Collections;
 import java.util.Set;
 import java.util.UUID;
 
@@ -85,8 +83,7 @@ abstract class MapRecord extends Record 
     protected final int level;
 
     protected MapRecord(SegmentStore store, RecordId id, int size, int level) {
-        // FIXME: ugly hack
-        super(new Segment(store, UUID.randomUUID(), ByteBuffer.allocate(0), Collections.<UUID>emptyList()),
checkNotNull(id));
+        super(store.getWriter().getDummySegment(), id);
         this.store = checkNotNull(store);
         this.size = checkElementIndex(size, MAX_SIZE);
         this.level = checkPositionIndex(level, MAX_NUMBER_OF_LEVELS);



Mime
View raw message