According to the wiki https://github.com/facebook/rocksdb/wiki/Iterator#error-handling, people always need to call RocksIterator#status() after Seek(), Next(), SeekToFirst(), SeekToLast(), SeekForPrev(), and Prev(), even if Valid()=true.
RocksIterator#status() is only used in a few loop, that is inconsistent with the description from the wiki.
(Additional, what is the best practice with using RocksIterator and the status()?)
@sihuazhou If the Wiki is correct, then it does indeed seem like RocksIterator#status() should be called more frequently.
However it seems like the behaviour might change again: https://github.com/facebook/rocksdb/pull/3810
@sagar0 Can you comment on whether that is the case?
If the wiki is actually correct, I would almost suggest that the Java API could automatically introduce the status check after all mentioned methods in RocksIterator. Otherwise this is super easy to overlook.
@StefanRRichter I think the Wiki will have to be updated again after #3810
Most helpful comment
@StefanRRichter I think the Wiki will have to be updated again after #3810