Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ public static org.iq80.leveldb.DB initLevelDB(File dbFile, StoreVersion version)
}
}
// if there is a version mismatch, we throw an exception, which means the service is unusable
checkVersion(tmpDb, version);
try {
checkVersion(tmpDb, version);
} catch (IOException ioe) {
tmpDb.close();
throw ioe;
}
}
return tmpDb;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ public static org.rocksdb.RocksDB initRockDB(File dbFile, StoreVersion version)
// is unusable
checkVersion(tmpDb, version);
} catch (RocksDBException e) {
tmpDb.close();
throw new IOException(e.getMessage(), e);
} catch (IOException ioe) {
tmpDb.close();
throw ioe;
}
}
return tmpDb;
Expand Down