You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/12/17 22:15:25 UTC

[GitHub] jihoonson commented on a change in pull request #6738: Fix auto compaction when the firstSegment is in skipOffset

jihoonson commented on a change in pull request #6738: Fix auto compaction when the firstSegment is in skipOffset
URL: https://github.com/apache/incubator-druid/pull/6738#discussion_r242336868
 
 

 ##########
 File path: server/src/main/java/org/apache/druid/server/coordinator/helper/NewestSegmentFirstIterator.java
 ##########
 @@ -354,25 +358,31 @@ private static Interval findInitialSearchInterval(
 
     final Interval skipInterval = new Interval(skipOffset, last.getInterval().getEnd());
 
-    final List<TimelineObjectHolder<String, DataSegment>> holders = timeline.lookup(
-        new Interval(first.getInterval().getStart(), last.getInterval().getEnd().minus(skipOffset))
-    );
+    final DateTime lookupStart = first.getInterval().getStart();
+    final DateTime lookupEnd = last.getInterval().getEnd().minus(skipOffset);
+    if (lookupStart.isBefore(lookupEnd)) {
+      final List<TimelineObjectHolder<String, DataSegment>> holders = timeline.lookup(
+          new Interval(first.getInterval().getStart(), last.getInterval().getEnd().minus(skipOffset))
 
 Review comment:
   Thanks. Fixed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org