File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
src/main/java/io/pwrlabs/database/rocksdb Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -381,13 +381,13 @@ public void flushToDisk() throws RocksDBException {
381381 try {
382382 try (WriteBatch batch = new WriteBatch ()) {
383383 //Clear old metadata from disk
384- // try (RocksIterator iterator = db.newIterator(metaDataHandle)) {
385- // iterator.seekToFirst();
386- // while (iterator.isValid()) {
387- // batch.delete(metaDataHandle, iterator.key());
388- // iterator.next();
389- // }
390- // }
384+ try (RocksIterator iterator = db .newIterator (metaDataHandle )) {
385+ iterator .seekToFirst ();
386+ while (iterator .isValid ()) {
387+ batch .delete (metaDataHandle , iterator .key ());
388+ iterator .next ();
389+ }
390+ }
391391
392392 if (rootHash != null ) {
393393 batch .put (metaDataHandle , KEY_ROOT_HASH .getBytes (), rootHash );
You can’t perform that action at this time.
0 commit comments