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


##########
src/java/org/apache/cassandra/db/compression/CompressionDictionaryCache.java:
##########
@@ -101,7 +105,10 @@ public void add(@Nullable CompressionDictionary 
compressionDictionary)
 
         // Only update cache if not already in the cache
         DictId newDictId = compressionDictionary.dictId();
-        cache.get(newDictId, id -> compressionDictionary);
+        cache.get(newDictId, id -> {
+            totalSize.addAndGet(compressionDictionary.rawDictionary().length);

Review Comment:
   this is what I have in mind ... `occupiedMemory()` would be a method on 
`CompressionDictionary`, I would add it after CASSANDRA-20941 lands.



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