Example: The time series is created sequentially by inserting (1,1) (2,2) (3,3) ...
Key, Value
1,1
2,2
3,3
4,4
5,5
6,6
The read cursor is put at the end via cursor.move_last() to be at the end of the series shortly after a new entry is inserted. So the read cursor is at the end while a new entry is put "behind" the end. This seems to be a critical action, because if this is not this constellation the following does not happen!
Read cursor is at position 5.
Write cursor puts in (6,6).
Read cursor is positioned via cursor.move_last().
Now the read cursor is put again at position 6 (ok)
Now the read cursor is asked to find(key,record,HAM_FIND_LT_MATCH) with key = 6. The result is key=5 and record=5 (ok)
Now repeat the step backward in time: find(key,record,HAM_FIND_LT_MATCH) with key=5. The result is key=4 and record = 4 (ok)
Now ask for the step forward in time: find(key,record,HAM_FIND_GT_MATCH) with key=4. The result is key=4 and record=6 (?????)
All this is NOT happening, if the last entry is put at the end and the read cursor is not at the last position.
Example: The time series is created sequentially by inserting (1,1) (2,2) (3,3) ...
Key, Value 1,1 2,2 3,3 4,4 5,5 6,6
The read cursor is put at the end via cursor.move_last() to be at the end of the series shortly after a new entry is inserted. So the read cursor is at the end while a new entry is put "behind" the end. This seems to be a critical action, because if this is not this constellation the following does not happen!
Read cursor is at position 5. Write cursor puts in (6,6). Read cursor is positioned via cursor.move_last(). Now the read cursor is put again at position 6 (ok) Now the read cursor is asked to find(key,record,HAM_FIND_LT_MATCH) with key = 6. The result is key=5 and record=5 (ok) Now repeat the step backward in time: find(key,record,HAM_FIND_LT_MATCH) with key=5. The result is key=4 and record = 4 (ok) Now ask for the step forward in time: find(key,record,HAM_FIND_GT_MATCH) with key=4. The result is key=4 and record=6 (?????)
All this is NOT happening, if the last entry is put at the end and the read cursor is not at the last position.