Skip to content
Merged
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 @@ -380,13 +380,13 @@ public long capacity() {
}

public void clearStreamRecords(long streamId) {
readLock.lock();
writeLock.lock();
try {
for (LogCacheBlock block : blocks) {
block.free(streamId);
}
} finally {
readLock.unlock();
writeLock.unlock();
}
}

Expand Down Expand Up @@ -519,12 +519,10 @@ public void free() {
}

public void free(long streamId) {
suppress(() -> {
StreamCache streamCache = map.remove(streamId);
if (streamCache != null) {
streamCache.free();
}
}, LOGGER);
StreamCache streamCache = map.remove(streamId);
if (streamCache != null) {
LOG_CACHE_ASYNC_EXECUTOR.execute(() -> suppress(streamCache::free, LOGGER));
}
}

public void addFreeListener(FreeListener freeListener) {
Expand Down
Loading