Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexShemetov committed Dec 24, 2023
1 parent 32e11d7 commit 4aee498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/ru/vk/itmo/shemetovalexey/InMemoryDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public void upsert(Entry<MemorySegment> entry) {
long valueSize = entry.value() == null ? 0 : entry.value().byteSize();
if (size.addAndGet(keySize + valueSize) >= maxSize) {
flush();
size.set(0);
}
} catch (IOException e) {
throw new UncheckedIOException(e);
Expand Down Expand Up @@ -177,6 +176,7 @@ public void flush() throws IOException {
} finally {
upsertLock.writeLock().unlock();
}
size.set(0);
});
}

Expand Down

0 comments on commit 4aee498

Please sign in to comment.