isNull(true) leaves Value in unsafe state for stream mode get
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Akiban Persistit |
Fix Released
|
High
|
Peter Beaman |
Bug Description
akiban persistit r392
The method isNull(boolean) was added in Persistit version 3.2.1. In that version, when isNull(true) actually skips a null in stream mode, the serialized item count is not incremented due to omitted code. This causes subsequent get operations to fail. The following sequence of operations (See com.persistit.
final Value value = new Value(_persistit);
In the last statement, value.getType() uses a reference to field 1 (count starts at 0), which is the first of two identical instances of ABC in the value. However, because the counter is not incremented, the value cache used to hold previously scanned fields is off by one and the reference to field one contains a null rather than an Object.
Related branches
- Nathan Williams: Approve
-
Diff: 63 lines (+30/-3)3 files modifiedsrc/main/java/com/persistit/Value.java (+1/-0)
src/test/java/com/persistit/StatisticsTaskTest.java (+5/-1)
src/test/java/com/persistit/unit/ValueTest4.java (+24/-2)
Changed in akiban-persistit: | |
assignee: | nobody → Peter Beaman (pbeaman) |
description: | updated |
Changed in akiban-persistit: | |
status: | Confirmed → Fix Committed |
Changed in akiban-persistit: | |
status: | Fix Committed → Fix Released |