Skip to content

CASSANDRA-21182 - Fix flaky DTest: largecolumn_test.TestLargeColumn#286

Open
samueldlightfoot wants to merge 1 commit intoapache:trunkfrom
samueldlightfoot:CASSANDRA-21147-fix-largecolumn-test-zgc
Open

CASSANDRA-21182 - Fix flaky DTest: largecolumn_test.TestLargeColumn#286
samueldlightfoot wants to merge 1 commit intoapache:trunkfrom
samueldlightfoot:CASSANDRA-21147-fix-largecolumn-test-zgc

Conversation

@samueldlightfoot
Copy link
Contributor

Force GC before direct memory measurements for ZGC compatibility

Generational ZGC (JDK 21 default) only processes PhantomReferences during major collections, which may not trigger during short test runs. This causes DirectByteBuffer Cleaners to not fire, leaving ~63MB of stale direct memory that inflates TOTAL_CAPACITY and fails the assertion.

Force System.gc() via nodetool before each measurement to ensure a major collection runs and reference processing completes.

CASSANDRA-21182

@samueldlightfoot samueldlightfoot force-pushed the CASSANDRA-21147-fix-largecolumn-test-zgc branch from ee35c74 to a268ba0 Compare February 23, 2026 12:45
Generational ZGC (JDK 21 default) only processes PhantomReferences
during major collections, which may not trigger during short test runs.
This causes DirectByteBuffer Cleaners to not fire, leaving ~63MB of
stale direct memory that inflates TOTAL_CAPACITY and fails the assertion.

Force System.gc() via nodetool before each measurement to ensure a major
collection runs and reference processing completes.
@samueldlightfoot samueldlightfoot force-pushed the CASSANDRA-21147-fix-largecolumn-test-zgc branch from a268ba0 to d30e663 Compare February 23, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants