You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "Jollyplum (via GitHub)" <gi...@apache.org> on 2026/04/04 00:02:01 UTC
[PR] mbyrd/cassandra 21245/trunk Uncompressed size is being used for compressed tables in maintenance operations [cassandra]
Jollyplum opened a new pull request, #4702:
URL: https://github.com/apache/cassandra/pull/4702
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](https://issues.apache.org/jira/browse/CASSANDRA-21245)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] mbyrd/cassandra 21245/trunk Uncompressed size is being used for compressed tables in maintenance operations [cassandra]
Posted by "netudima (via GitHub)" <gi...@apache.org>.
netudima commented on code in PR #4702:
URL: https://github.com/apache/cassandra/pull/4702#discussion_r3036763354
##########
test/unit/org/apache/cassandra/db/compaction/CompactionsCQLTest.java:
##########
@@ -903,9 +907,36 @@ public void testNoDiskspace() throws Throwable
{
CompactionManager.instance.active.finishCompaction(holder);
}
+
+ // Should be able to run when the sstables in question are 90% of the total available space
+ holder = holder(OperationType.COMPACTION, 0.9);
+ CompactionManager.instance.active.beginCompaction(holder);
+ try
+ {
+ getCurrentColumnFamilyStore().forceMajorCompaction();
+ }
+ finally
+ {
+ CompactionManager.instance.active.finishCompaction(holder);
+ }
+ }
+
+ private static final class OnDiskLengthOverrideSSTableReader extends ForwardingSSTableReader
Review Comment:
just wondering what is the purpose of the Reader substitution?.. (if in any way we use a custom Holder to return getCompactionInfo)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] mbyrd/cassandra 21245/trunk Uncompressed size is being used for compressed tables in maintenance operations [cassandra]
Posted by "netudima (via GitHub)" <gi...@apache.org>.
netudima closed pull request #4702: mbyrd/cassandra 21245/trunk Uncompressed size is being used for compressed tables in maintenance operations
URL: https://github.com/apache/cassandra/pull/4702
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] mbyrd/cassandra 21245/trunk Uncompressed size is being used for compressed tables in maintenance operations [cassandra]
Posted by "netudima (via GitHub)" <gi...@apache.org>.
netudima commented on PR #4702:
URL: https://github.com/apache/cassandra/pull/4702#issuecomment-4449542970
Merged as https://github.com/apache/cassandra/commit/af6930c9868756f98a068b63321930c73617e785
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] mbyrd/cassandra 21245/trunk Uncompressed size is being used for compressed tables in maintenance operations [cassandra]
Posted by "krummas (via GitHub)" <gi...@apache.org>.
krummas commented on code in PR #4702:
URL: https://github.com/apache/cassandra/pull/4702#discussion_r3179777175
##########
src/java/org/apache/cassandra/tools/nodetool/CompactionStats.java:
##########
@@ -132,13 +138,14 @@ public static void reportCompactionTable(List<Map<String,String>> compactions, l
long remainingBytes = 0;
if (vtableOutput)
- table.add("keyspace", "table", "task id", "completion ratio", "kind", "progress", "sstables", "total", "unit", "target directory");
+ table.add("keyspace", "table", "task id", "completion ratio", "kind", "progress", "sstables", "total", "total compressed", "unit", "target directory");
else
- table.add("id", "compaction type", "keyspace", "table", "completed", "total", "unit", "progress");
+ table.add("id", "compaction type", "keyspace", "table", "completed", "total", "compressed", "unit", "progress");
Review Comment:
I think we need to keep the old format when not having the `--vtable` flag
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] mbyrd/cassandra 21245/trunk Uncompressed size is being used for compressed tables in maintenance operations [cassandra]
Posted by "netudima (via GitHub)" <gi...@apache.org>.
netudima commented on code in PR #4702:
URL: https://github.com/apache/cassandra/pull/4702#discussion_r3036685950
##########
test/distributed/org/apache/cassandra/distributed/test/SecondaryIndexCompactionTest.java:
##########
@@ -79,7 +79,7 @@ public MockHolder(TableMetadata metadata, Set<SSTableReader> sstables)
@Override
public CompactionInfo getCompactionInfo()
{
- return new CompactionInfo(metadata, OperationType.COMPACTION, 0, 1000, nextTimeUUID(), sstables);
+ return new CompactionInfo(metadata, OperationType.COMPACTION, 0, 1000, 0, nextTimeUUID(), sstables);
Review Comment:
do we set compressed value as 0 intentionally here?
##########
test/distributed/org/apache/cassandra/distributed/test/SecondaryIndexCompactionTest.java:
##########
@@ -79,7 +79,7 @@ public MockHolder(TableMetadata metadata, Set<SSTableReader> sstables)
@Override
public CompactionInfo getCompactionInfo()
{
- return new CompactionInfo(metadata, OperationType.COMPACTION, 0, 1000, nextTimeUUID(), sstables);
+ return new CompactionInfo(metadata, OperationType.COMPACTION, 0, 1000, 0, nextTimeUUID(), sstables);
Review Comment:
nit: do we set compressed value as 0 intentionally here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org