dynamobi/dynamobi — Issue #499: [FNL-9] Splits on non-leaf nodes in monotonic mode causes assertion
Author: dynamobi-build
Created: 2011-12-30 03:29:57+00:00
State: closed
Labels: BTree, FNL

[reporter="zfong", created="Mon, 16 Jan 2006 14:12:29 -0500 (GMT-05:00)"]
When inserting a large number of records into a btree in monotonic mode, if a split is required, the code will hit the permAssert() call in splitNode().

The "extra" test case, testMonotonicInsert(), in open/lu/test/BTreeTest.cpp exercises this condition.

The problem seems to occur when the split point is at the end of the node, which occurs normally in monotonic mode. This should also be a problem in non-monotonic mode, but is probably more difficult to simulate. E.g., you probably need to insert a record with a very large key that exceeds the size of the node, where the key value is the last in the node. The large keysize would force the split point to be at that key, which is what's required to surface the bug.