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 21:29:21 UTC

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

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



##########
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:
       to help maintenance it would be good to document this

##########
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:
       >  revert to nearly that once the workers expire.
   what is the extra 5% for?




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