github-actions[bot] commented on code in PR #69996:
URL: https://github.com/apache/doris/pull/69996#discussion_r4443420978
##########
fe/fe-core/src/main/java/org/apache/doris/arrowflight/results/FlightSqlChannel.java:
##########
@@ -124,8 +128,16 @@ public long getAllocatedMemory() {
return allocator.getAllocatedMemory();
}
- public void reset() {
+ public synchronized void registerRemoteQuery(TUniqueId queryId,
List<TUniqueId> resultIds,
+ List<TNetworkAddress> backends, int timeoutSeconds) {
+ FlightSqlQueryCancellation.INSTANCE.register(queryId, resultIds,
backends, timeoutSeconds);
+ remoteResultIds.addAll(resultIds);
+ }
+
+ public synchronized void reset() {
resultCache.invalidateAll();
+ FlightSqlQueryCancellation.INSTANCE.unregister(remoteResultIds);
Review Comment:
[P1] Keep the cancellation route alive while a DoGet is still active. Flight
calls are not transport-serialized, so a client can start the next request or
close the session while the previous stream is still reading;
`beginRequest()`/teardown reaches this `reset()` and removes `remoteResultIds`.
When that stream later closes, the BE's `cancelFlightQuery` gets NOT_FOUND and
sends no `cancelPipelineXPlanFragmentAsync` to the remote result BEs, leaving
their pipelines and result buffers running until the timeout. Track active
DoGets or cancel before unregistering so reset cannot invalidate an in-flight
stream's route.
--
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]