gortiz commented on code in PR #15992:
URL: https://github.com/apache/pinot/pull/15992#discussion_r2128093168
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/dispatch/QueryDispatcher.java:
##########
@@ -166,7 +166,13 @@ public QueryResult submitAndReduce(RequestContext context,
DispatchableSubPlan d
Set<QueryServerInstance> servers = new HashSet<>();
try {
submit(requestId, dispatchableSubPlan, timeoutMs, servers, queryOptions);
- return runReducer(requestId, dispatchableSubPlan, timeoutMs,
queryOptions, _mailboxService);
+ QueryResult result = runReducer(requestId, dispatchableSubPlan,
timeoutMs, queryOptions, _mailboxService);
+ if (result.getProcessingException() != null) {
+ MultiStageQueryStats statsFromCancel = cancelWithStats(requestId,
servers);
+ return result.withStats(statsFromCancel);
+ }
+ cancel(requestId, servers);
Review Comment:
This is useful to clean up the stats cache and solves the TODO below. I've
just pushed a new version that is simpler to read (and only tries to cancel
once).
This cancel method sends an asynchronous cancel request without waiting for
a response, so it should be very inexpensive compared to all other GRPC
messages we send (ie, rows sent using mailboxes or the plan itself).
--
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]