Revision: 7990
http://sourceforge.net/p/bigdata/code/7990
Author: martyncutcher
Date: 2014-03-17 15:00:40 +0000 (Mon, 17 Mar 2014)
Log Message:
-----------
Fix for #855 to ensure a bad null child addr is not persisted
Modified Paths:
--------------
branches/BIGDATA_RELEASE_1_2_4/bigdata/src/java/com/bigdata/btree/data/DefaultNodeCoder.java
Modified: branches/BIGDATA_RELEASE_1_2_4/bigdata/src/java/com/bigdata/btree/data/DefaultNodeCoder.java
===================================================================
--- branches/BIGDATA_RELEASE_1_2_4/bigdata/src/java/com/bigdata/btree/data/DefaultNodeCoder.java 2014-03-16 23:25:29 UTC (rev 7989)
+++ branches/BIGDATA_RELEASE_1_2_4/bigdata/src/java/com/bigdata/btree/data/DefaultNodeCoder.java 2014-03-17 15:00:40 UTC (rev 7990)
@@ -43,6 +43,7 @@
import com.bigdata.io.AbstractFixedByteArrayBuffer;
import com.bigdata.io.DataOutputBuffer;
import com.bigdata.rawstore.Bytes;
+import com.bigdata.rawstore.IRawStore;
/**
* Default implementation for immutable {@link INodeData} records.
@@ -212,6 +213,16 @@
// final int O_childAddr = buf.pos();
for (int i = 0; i <= nkeys; i++) {
+ /*
+ * See #855 (Child identity is not persistent).
+ */
+
+ final long childAddr = node.getChildAddr(i);
+
+ if (childAddr == IRawStore.NULL)
+ throw new AssertionError("Child is not persistent: index=" + i
+ + " out of " + nkeys + " entries, " + node.toString());
+
buf.putLong(node.getChildAddr(i));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|