OneSizeFitsQuorum commented on code in PR #924:
URL: https://github.com/apache/ratis/pull/924#discussion_r1331106952


##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLog.java:
##########
@@ -505,6 +507,7 @@ public CompletableFuture<Long> onSnapshotInstalled(long 
lastSnapshotIndex) {
   public void close() throws IOException {
     try(AutoCloseableLock writeLock = writeLock()) {
       super.close();
+      cacheEviction.close();
       cache.close();

Review Comment:
   It looks like the cache is now being called by multiple threads 
concurrently. Should we add more concurrency control logic inside the 
cache?Otherwise, concurrent traversal and modification of arrays such as 
closedSegments could fail



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to