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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]