netudima commented on code in PR #286:
URL: https://github.com/apache/cassandra-dtest/pull/286#discussion_r2839842665
##########
largecolumn_test.py:
##########
@@ -69,11 +71,18 @@ def test_cleanup(self):
# Now run the full stack to warm up internal caches/pools
LARGE_COLUMN_SIZE = 1024 * 1024 * 63
self.stress_with_col_size(cluster, node1, LARGE_COLUMN_SIZE)
+ # Generational ZGC (JDK 21) only processes PhantomReferences during
major collections
+ # which may not run during short tests. Force a GC; sleep lets the
async Cleaner
+ # thread finish decrementing TOTAL_CAPACITY before we measure.
+ subprocess.check_call(['jcmd', str(node1.pid), 'GC.run'])
+ time.sleep(1)
after1stLargeStress = self.directbytes(node1)
logger.info("After 1st large column stress, direct memory:
{0}".format(after1stLargeStress))
# Now run the full stack to see how much memory is allocated for the
second "large" columns request
self.stress_with_col_size(cluster, node1, LARGE_COLUMN_SIZE)
+ subprocess.check_call(['jcmd', str(node1.pid), 'GC.run'])
Review Comment:
What about adding a limited retry loop (sleep, check direct bytes, repeat)
to avoid flakiness?.. Sometimes CI is really slow, and 1 second might not be
enough.
--
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]