aratno commented on code in PR #4402:
URL: https://github.com/apache/cassandra/pull/4402#discussion_r2414807421
##########
src/java/org/apache/cassandra/db/compaction/CompactionTask.java:
##########
@@ -71,6 +73,8 @@
public class CompactionTask extends AbstractCompactionTask
{
protected static final Logger logger =
LoggerFactory.getLogger(CompactionTask.class);
+ public static final int MEGABYTE = 1024 * 1024 * 1024;
+ public static final boolean CURSOR_COMPACTION_ENABLED =
SystemProperties.getBoolean("cassandra.enable_cursor_compaction", () -> true);
Review Comment:
Could you move this to Config.java? One advantage of having it there is that
the AST tests (like SingleNodeTableWalkTest) that generate random config would
be able to exercise it. That's our best path to coverage with lots of different
schemas and configurations.
If you can locally do a longer run of that test with cursor-compaction
enabled, that would be useful too. That would be done via overriding
`StatefulASTBase#clusterConfig` with the new config set.
##########
src/java/org/apache/cassandra/db/rows/Rows.java:
##########
@@ -103,13 +103,13 @@ public static int collectStats(Row row,
PartitionStatisticsCollector collector)
{
assert !row.isEmpty();
- collector.update(row.primaryKeyLivenessInfo());
- collector.update(row.deletion().time());
+ collector.update(row.primaryKeyLivenessInfo()); // matched
+ collector.update(row.deletion().time()); // matched
long result =
row.accumulate(StatsAccumulation::accumulateOnColumnData, collector, 0);
-
collector.updateColumnSetPerRow(StatsAccumulation.unpackColumnCount(result));
- return StatsAccumulation.unpackCellCount(result);
+
collector.updateColumnSetPerRow(StatsAccumulation.unpackColumnCount(result));
// matched
+ return StatsAccumulation.unpackCellCount(result); // matched
Review Comment:
Intend to keep?
##########
src/java/org/apache/cassandra/io/util/RandomAccessReader.java:
##########
@@ -211,6 +211,11 @@ public void seek(long newPosition)
@Override
public int skipBytes(int n) throws IOException
+ {
+ return (int)skipBytes((long)n);
+ }
+
+ public long skipBytes(long n) throws IOException
Review Comment:
Long overflow on current + n below? Would have existed before as well, I
suppose. And probably exceeds max buffer size anyway.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]