Skip to content

mbyrd/cassandra 21245/trunk Uncompressed size is being used for compressed tables in maintenance operations#4702

Open
Jollyplum wants to merge 2 commits intoapache:trunkfrom
Jollyplum:mbyrd/CASSANDRA-21245/trunk
Open

mbyrd/cassandra 21245/trunk Uncompressed size is being used for compressed tables in maintenance operations#4702
Jollyplum wants to merge 2 commits intoapache:trunkfrom
Jollyplum:mbyrd/CASSANDRA-21245/trunk

Conversation

@Jollyplum
Copy link
Copy Markdown
Contributor

Use compression ratio to scale the amount of remaining disk usage
CompactionInfo::estimatedRemainingWriteBytes is uncompressed, causing compaction to be rejected due to size when it has space to complete

Will attach CI run to the JIRA.
CASSANDRA-21245

Matt Byrd and others added 2 commits April 4, 2026 00:48
…operations

use compression ratio to scale the amount of remaining disk usage
CompactionInfo::estimatedRemainingWriteBytes is uncompressed, causing compaction to be rejected due to size when it has space to complete

patch by Matt Byrd; reviewed by  for CASSANDRA-21245

Co-authored-by: Jon Meredith <jmeredithco@apple.com>
public CompactionInfo getCompactionInfo()
{
return new CompactionInfo(metadata, OperationType.COMPACTION, 0, 1000, nextTimeUUID(), sstables);
return new CompactionInfo(metadata, OperationType.COMPACTION, 0, 1000, 0, nextTimeUUID(), sstables);
Copy link
Copy Markdown
Contributor

@netudima netudima Apr 5, 2026

Choose a reason for hiding this comment

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

nit: do we set compressed value as 0 intentionally here?

}
}

private static final class OnDiskLengthOverrideSSTableReader extends ForwardingSSTableReader
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just wondering what is the purpose of the Reader substitution?.. (if in any way we use a custom Holder to return getCompactionInfo)

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