gianm commented on a change in pull request #10125:
URL: https://github.com/apache/druid/pull/10125#discussion_r449187355



##########
File path: 
server/src/main/java/org/apache/druid/client/CachingClusteredClient.java
##########
@@ -401,11 +407,16 @@ private ClusterQueryResult(Sequence<T> sequence, int 
numQueryServers)
       }
     }
 
-    private Set<SegmentServerSelector> 
computeSegmentsToQuery(TimelineLookup<String, ServerSelector> timeline)
+    private Set<SegmentServerSelector> computeSegmentsToQuery(
+        TimelineLookup<String, ServerSelector> timeline,
+        boolean specificSegments
+    )
     {
+      final java.util.function.Function<Interval, 
List<TimelineObjectHolder<String, ServerSelector>>> lookupFn
+          = specificSegments ? timeline::lookupWithIncompletePartitions : 
timeline::lookup;
       final List<TimelineObjectHolder<String, ServerSelector>> serversLookup = 
toolChest.filterSegments(
           query,
-          intervals.stream().flatMap(i -> 
timeline.lookup(i).stream()).collect(Collectors.toList())
+          intervals.stream().flatMap(i -> 
lookupFn.apply(i).stream()).collect(Collectors.toList())

Review comment:
       This still isn't right. It will get all segments for the time chunk. We 
should use `timeline.findEntry` when the incoming QSS calls for specific 
segments, like ServerManager.getQueryRunnerForSegments does.




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

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