jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1564333 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment: Segment.java SegmentPropertyState.java
Date Tue, 04 Feb 2014 15:07:10 GMT
Author: jukka
Date: Tue Feb  4 15:07:10 2014
New Revision: 1564333

URL: http://svn.apache.org/r1564333
Log:
OAK-1374: Async indexer fails on the SegmentMK

The property record could be on a different segment than the blob value,
so avoid throwing away the segment identifier included in the RecordId.
The SegmentBlob instance will automatically resolve the correct segment.

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Segment.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Segment.java?rev=1564333&r1=1564332&r2=1564333&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Segment.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Segment.java
Tue Feb  4 15:07:10 2014
@@ -464,11 +464,6 @@ public class Segment {
         }
     }
 
-    SegmentBlob createBlob(int offset) {
-        RecordId id = new RecordId(uuid, offset);
-        return new SegmentBlob(this, id);
-    }
-
     long readBlobLength(int offset) {
         long high = readInt(offset + 2);
         long low = readInt(offset + 6);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentPropertyState.java?rev=1564333&r1=1564332&r2=1564333&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentPropertyState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentPropertyState.java
Tue Feb  4 15:07:10 2014
@@ -162,7 +162,7 @@ class SegmentPropertyState extends Recor
     @SuppressWarnings("unchecked")
     private <T> T getValue(Segment segment, RecordId id, Type<T> type) {
         if (type == BINARY) {
-            return (T) segment.createBlob(id.getOffset()); // load binaries lazily
+            return (T) new SegmentBlob(segment, id); // load binaries lazily
         }
 
         String value = segment.readString(id);



Mime
View raw message