You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/09/16 10:10:41 UTC

[GitHub] [cassandra] bereng commented on a change in pull request #737: CASSANDRA-15880 ThreadLocal removal on close() to prevent leaks

bereng commented on a change in pull request #737:
URL: https://github.com/apache/cassandra/pull/737#discussion_r489322822



##########
File path: src/java/org/apache/cassandra/io/util/CompressedChunkReader.java
##########
@@ -85,28 +88,28 @@ public Rebufferer instantiateRebufferer()
 
     public static class Standard extends CompressedChunkReader
     {
-        // we read the raw compressed bytes into this buffer, then uncompressed them into the provided one.
-        private final ThreadLocal<ByteBuffer> compressedHolder;
+        // We read the raw compressed bytes into a buffer, then uncompressed them into the provided one.
+        // Notice we have 1 SimpleCachedBufferPool per BBType which wraps a FastThreadLocal BB
+        private static final EnumMap<BufferType, SimpleCachedBufferPool> reusableCompressBBs = new EnumMap<>(BufferType.class);

Review comment:
       :facepalm: apologies...




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org