smiklosovic commented on code in PR #4521:
URL: https://github.com/apache/cassandra/pull/4521#discussion_r2619488064


##########
src/java/org/apache/cassandra/db/compression/CompressionDictionaryManager.java:
##########
@@ -283,7 +283,14 @@ public CompositeData getCompressionDictionary()
         if (compressionDictionary == null)
             return null;
 
-        return 
CompressionDictionaryDetailsTabularData.fromCompressionDictionary(keyspaceName, 
tableName, compressionDictionary);
+        try
+        {
+            return 
CompressionDictionaryDetailsTabularData.fromCompressionDictionary(keyspaceName, 
tableName, compressionDictionary);
+        }
+        finally
+        {
+            compressionDictionary.close();
+        }

Review Comment:
   without doing it like this we are not closing anywhere so we would keep 
dictionary we just retrieved from disk dangling, not releasing it anywhere, 
then once that gets GCed it would leak.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to