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 2020/06/26 23:29:29 UTC

[GitHub] [druid] jihoonson commented on a change in pull request #10082: Fix RetryQueryRunner to actually do the job

jihoonson commented on a change in pull request #10082:
URL: https://github.com/apache/druid/pull/10082#discussion_r446450845



##########
File path: processing/src/main/java/org/apache/druid/query/context/ResponseContext.java
##########
@@ -112,6 +112,16 @@
         "uncoveredIntervalsOverflowed",
             (oldValue, newValue) -> (boolean) oldValue || (boolean) newValue
     ),
+    /**
+     * Expected remaining number of responses from query nodes.
+     * The value is initialized in {@code CachingClusteredClient} when it initializes the connection to the query nodes,
+     * and is updated whenever they respond (@code DirectDruidClient). {@code RetryQueryRunner} uses this value to
+     * check if the {@link #MISSING_SEGMENTS} is valid.
+     */
+    REMAINING_RESPONSES_FROM_QUERY_NODES(

Review comment:
       👍 added.

##########
File path: server/src/main/java/org/apache/druid/client/CachingClusteredClient.java
##########
@@ -618,6 +619,7 @@ private void addSequencesFromServer(
         final SortedMap<DruidServer, List<SegmentDescriptor>> segmentsByServer
     )
     {
+      responseContext.put(Key.REMAINING_RESPONSES_FROM_QUERY_NODES, segmentsByServer.size());

Review comment:
       I think the response contexts are shared between subqueries, but it won't be a problem because subqueries are not executed in parallel for now. Same for `UnionDataSource`. However, I agree that it should be per subquery for the future. I made needed changes to set subqueryId for union and store number of servers remaining per subquery or query.




----------------------------------------------------------------
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:
users@infra.apache.org



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