CASSANDRA-16772: Support multiple SSTables per table in user defined cleanup - #5153
Open
cheeeee wants to merge 1 commit into
Open
CASSANDRA-16772: Support multiple SSTables per table in user defined cleanup#5153cheeeee wants to merge 1 commit into
cheeeee wants to merge 1 commit into
Conversation
…A-16772) In CompactionManager.forceUserDefinedCleanup(), descriptors were grouped using a HashMap<ColumnFamilyStore, Descriptor>. When a user passed multiple SSTables for the same table (e.g. nodetool cleanup -u /data/file1.db /data/file2.db), descriptors.put(cfs, desc) overwrote earlier descriptors with the same key, silently discarding all but the last SSTable. This patch: 1. Replaces the custom loop and HashMap with Descriptor.fromFilenamesGrouped(), aligning forceUserDefinedCleanup() with forceUserDefinedCompaction(). 2. Iterates over descriptors.get(cfs), ensuring all user-specified SSTables are cleaned. 3. Guards against concurrent compactions by checking for null LifecycleTransaction, logging a warning and safely continuing to process the remaining sstables. 4. Adds UserDefinedCleanupMultipleSSTablesTest verifying that all passed SSTables are processed. Fixes: CASSANDRA-16772
cheeeee
force-pushed
the
CASSANDRA-16772-trunk
branch
from
September 11, 2026 01:06
49eafc2 to
6d6faad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status: changes requested — not ready to merge
The added regression test passes with the original single-descriptor bug and does not prove both requested SSTables were processed.
Verification correction
Earlier descriptions overstated correctness and/or test coverage. Those claims are withdrawn. AI-assisted source review has been performed; this is not maintainer approval. Previously mixed build artifacts are not accepted as verification evidence. Corrective changes and clean, targeted verification are in progress; the published head has not yet been replaced.
Published head under review:
6d6faad940826115944ad55c3a42b85920ddd143.