AmatyaAvadhanula commented on code in PR #15676:
URL: https://github.com/apache/druid/pull/15676#discussion_r1451923619


##########
server/src/main/java/org/apache/druid/server/coordinator/compact/NewestSegmentFirstIterator.java:
##########
@@ -339,6 +339,12 @@ private SegmentsToCompact findSegmentsToCompact(
     while (compactibleSegmentIterator.hasNext()) {
       List<DataSegment> segments = compactibleSegmentIterator.next();
 
+      // Do not compact an interval which comprises of a single tombstone
+      // If there are multiple tombstones in the interval, we may still want 
to compact them
+      if (segments.size() == 1 && segments.get(0).isTombstone()) {
+        continue;

Review Comment:
   Yes, but a DataSegment returned that way will return false when checking if 
it is a tombstone.
   I have also made the change locally and the test fails



-- 
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]

Reply via email to