blambov commented on code in PR #4402:
URL: https://github.com/apache/cassandra/pull/4402#discussion_r2489343977
##########
src/java/org/apache/cassandra/db/compaction/CompactionCursor.java:
##########
@@ -439,12 +416,44 @@ else if (UnfilteredSerializer.isTombstoneMarker(flags)) {
return partitionWritten;
}
+ private DeletionTime maybePurgedOutputDeletion(DeletionTime
mergedDeletion) throws IOException
+ {
+ final DeletionTime toWritePartitionDeletion;
+
+ if (!mergedDeletion.isLive() && !purger.shouldPurge(mergedDeletion))
+ {
+ toWritePartitionDeletion = mergedDeletion;
+ maybeSwitchWriter(compactionAwareWriter);
Review Comment:
I know this may be slightly less efficient, but I would prefer the writing
to be done by the caller, rechecking `isLive` on the purged deletion, for
clarity.
Alternatively, rename the method to something that clarifies that it may
also write the partition header.
--
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]