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
cheeeee
force-pushed
the
CASSANDRA-16772-trunk
branch
from
September 11, 2026 01:06
49eafc2 to
6d6faad
Compare
Group requested descriptors with Descriptor.fromFilenamesGrouped and clean each active SSTable instead of retaining only the last descriptor per table. Skip a descriptor when its SSTable cannot be acquired for cleanup. Cover two requested SSTables containing owned and unowned partitions and an unrequested third SSTable. Verify replacement of both requested originals, removal of their unowned rows, and preservation of the unrequested data. CASSANDRA-16772 Generated-by: Claude (Anthropic)
cheeeee
force-pushed
the
CASSANDRA-16772-trunk
branch
from
September 11, 2026 22:51
6d6faad to
55168db
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.
CASSANDRA-16772: CompactionManager.forceUserDefinedCleanup groups the requested files in a
HashMap<ColumnFamilyStore, Descriptor>, so only the last file named for a table is cleaned and the
others are silently ignored.
Change: use Descriptor.fromFilenamesGrouped, which returns a Multimap and is what
forceUserDefinedCompaction already uses, and iterate all descriptors per table. A table that cannot be
locked for cleanup (tryModify returns null because it is being compacted) is skipped with a warning
instead of dereferencing the null transaction. The ring-join precondition moves ahead of filename
parsing. Unknown schema, inactive and unreadable files are still skipped and logged as before.
Testing:
partitions, three SSTables each holding two partitions; cleanup is requested for two of them. Both
requested originals are replaced by outputs that contain exactly their owned partition, and the
unrequested SSTable is untouched. Without the change the first requested file is left as is.
CASSANDRA-16772