Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonHxy committed Mar 24, 2024
1 parent 9d98e11 commit f362987
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ public void compact(byte[] firstKey, byte[] lastKey) throws IOException {
public void compact() throws IOException {
readLock.lock();
try {
throwIfClosed();
final long start = System.currentTimeMillis();
final int oriRocksDBFileCount = db.getLiveFilesMetaData().size();
final long oriRocksDBSize = getRocksDBSize();
Expand Down Expand Up @@ -646,9 +647,10 @@ public long count() throws IOException {
}

@Override
public Batch newBatch() {
public Batch newBatch() throws IOException {
readLock.lock();
try {
throwIfClosed();
return new RocksDBBatch(writeBatchMaxSize);
} finally {
readLock.unlock();
Expand Down

0 comments on commit f362987

Please sign in to comment.