You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/10/29 09:13:10 UTC

[GitHub] [bookkeeper] Vanlightly commented on a change in pull request #2868: Readops and writeops for the read cache are disabled after the readcache has been shutdown

Vanlightly commented on a change in pull request #2868:
URL: https://github.com/apache/bookkeeper/pull/2868#discussion_r739068954



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/ReadCache.java
##########
@@ -76,18 +82,24 @@ public ReadCache(ByteBufAllocator allocator, long maxCacheSize, int maxSegmentSi
             cacheSegments.add(Unpooled.directBuffer(segmentSize, segmentSize));
             cacheIndexes.add(new ConcurrentLongLongPairHashMap(4096, 2 * Runtime.getRuntime().availableProcessors()));
         }
+        isStorageShutdown = false;
     }
 
     @Override
     public void close() {
         cacheSegments.forEach(ByteBuf::release);
+        isStorageShutdown = true;

Review comment:
       This will need the write lock else a read can still sneak through.




-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org