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


##########
test/unit/org/apache/cassandra/db/compression/CompressionDictionaryIntegrationTest.java:
##########
@@ -134,7 +134,7 @@ public void testResourceCleanupOnClose() throws Exception
 
         assertThat(testDict.selfRef().globalCount())
         .as("Dictionary's reference count should be 1 after adding to cache")
-        .isOne();
+        .isOne(); // TODO this fails, for some reason, this is "2" instead of 
"1".

Review Comment:
   For `selfRef().globalCount()` to be ever 0 as this test expects, when 
looking into the implementation where it is like:
   
       public int globalCount()
       {
           return state.globalState.count();
       }
   
       int count()
       {
           return 1 + counts.get();
       }
   
   So in order for that to be 0, then `1 + counts.get()` has to be 0, that is 
only when `1 + (-1)` = 0 which means that `counts.get()` is -1 (I see that in 
debugger when executing this on trunk branch)
   
   So before this set of changes, `counts.get()` was -1, but after this set of 
changes it is 0. 
   
   That means that we are most probably leaking something somewhere still. 



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