diff --git a/src/main/java/it/cavallium/dbengine/database/disk/RocksDBFile.java b/src/main/java/it/cavallium/dbengine/database/disk/RocksDBFile.java index 8dd4376..a3c3acc 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/RocksDBFile.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/RocksDBFile.java @@ -225,6 +225,7 @@ public class RocksDBFile implements Comparable { } return new RocksDBFileIterationStateBegin(meta); } else { + rocksIterator.statusUnsafe(); rawKey = rocksIterator.keyBuf().copy(); rawValue = rocksIterator.valueBuf().copy(); rocksIterator.next(); diff --git a/src/main/java/it/cavallium/dbengine/database/disk/rocksdb/RocksIteratorObj.java b/src/main/java/it/cavallium/dbengine/database/disk/rocksdb/RocksIteratorObj.java index b77122c..15693b9 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/rocksdb/RocksIteratorObj.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/rocksdb/RocksIteratorObj.java @@ -168,6 +168,10 @@ public abstract class RocksIteratorObj extends SimpleResource { rocksIterator.next(); } + public synchronized void statusUnsafe() throws RocksDBException { + rocksIterator.status(); + } + public synchronized void seekToLast() throws RocksDBException { ensureOpen(); startedIterSeek.increment();