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 2021/11/12 19:08:04 UTC

[GitHub] [cassandra] maedhroz commented on a change in pull request #1309: CASSANDRA-17039 Start checking for expired threads after the sync tasks they run have completed

maedhroz commented on a change in pull request #1309:
URL: https://github.com/apache/cassandra/pull/1309#discussion_r748525029



##########
File path: test/unit/org/apache/cassandra/repair/RepairJobTest.java
##########
@@ -274,9 +277,9 @@ public void testNoTreesRetainedAfterDifference() throws Throwable
         long millisUntilFreed;
         for (millisUntilFreed = 0; millisUntilFreed < TEST_TIMEOUT_S * 1000; millisUntilFreed += THREAD_TIMEOUT_MILLIS)
         {
-            // The measured size of the syncingTasks, and result of the computation should be much smaller
+            // Once the threads die, the size of the session should return to nearly pre-execution levels.
             TimeUnit.MILLISECONDS.sleep(THREAD_TIMEOUT_MILLIS);
-            if (ObjectSizes.measureDeep(session) < 0.8 * singleTreeSize)
+            if (ObjectSizes.measureDeep(session) <= (sizeBeforeTasks * 1.05))

Review comment:
       The starting size of the session (before a single task is submitted) is much higher in Java 11 than Java 8 for some reason, but the amount of memory freed by the dying threads is almost exactly the same. The idea here is that we simply remember the starting size and make sure we revert to nearly that once the workers expire.




-- 
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: pr-unsubscribe@cassandra.apache.org

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