Skip to content

CNDB-13524: Properly shutdown executors, use test CFS in PendingAntiCompactionTest #1832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

driftx
Copy link

@driftx driftx commented Jun 24, 2025

What is the issue

In PendingAntiCompactionTest, the executors don't properly wait for completion to shutdown which causes shared state interference when the whole class is run.

What does this PR fix and why was it fixed

Waits for operations to complete, prefer test CFS over mock

Copy link

Checklist before you submit for review

  • Make sure there is a PR in the CNDB project updating the Converged Cassandra version
  • Use NoSpamLogger for log lines that may appear frequently in the logs
  • Verify test results on Butler
  • Test coverage for new/modified code is > 80%
  • Proper code formatting
  • Proper title for each commit staring with the project-issue number, like CNDB-1234
  • Each commit has a meaningful description
  • Each commit is not very long and contains related changes
  • Renames, moves and reformatting are in distinct commits
  • All new files should contain the DataStax copyright header instead of the Apache License one

@driftx driftx requested a review from a team June 24, 2025 17:41
@@ -717,7 +741,7 @@ public boolean apply(SSTableReader sstable)
}
finally
{
es.shutdown();
waitForExecutorShutdown(es);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this help to fix the problem for this test? Can you put the reasoning in the commit message or PR description?
As per the checklist

Each commit has a meaningful description

It looks like maybe only makeSSTables is meaningful here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The primary fix is waiting for the executor to finish shutting down after shutdown() is invoked. When we don't do this it causes interference when the whole class is run.

makeSSTables gets around another shared state issue with MockSchema.newCFS but that is secondary to the executor problem.

@jtgrabowski
Copy link

Please see the attached check list, it contains the following point:

Proper title for each commit staring with the project-issue number, like CNDB-1234

@driftx driftx changed the title Properly shutdown executors, use test CFS CNDB-13524: Properly shutdown executors, use test CFS in PendingAntiCompactionTest Jun 25, 2025
@driftx driftx requested a review from jtgrabowski June 25, 2025 12:36
Copy link

@cassci-bot
Copy link

❌ Build ds-cassandra-pr-gate/PR-1832 rejected by Butler


1 new test failure(s) in 2 builds
See build details here


Found 1 new test failures

Test Explanation Branch history Upstream history
o.a.c.u.b.BinLogTest.testTruncationReleasesLogS... regression 🔴🔵 🔵🔵🔵🔵🔵🔵🔵

Found 1 known test failures

@driftx driftx merged commit ceb1817 into main Jun 26, 2025
485 of 491 checks passed
@driftx driftx deleted the CNDB-13524 branch June 26, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants