github-actions[bot] commented on code in PR #69298:
URL: https://github.com/apache/doris/pull/69298#discussion_r4318122550
##########
fe/fe-core/src/main/java/org/apache/doris/connector/ConnectorSessionBuilder.java:
##########
@@ -174,9 +175,20 @@ public ConnectorSession build() {
}
}
}
+ ConnectorStatementScope scope = captureStatementScope();
+ if (scope != ConnectorStatementScope.NONE && connectContext != null) {
+ StmtExecutor owner = connectContext.getExecutor();
+ if (owner != null) {
+ scope.computeIfAbsent(QueryTaskGroups.SCOPE_KEY, () -> {
Review Comment:
[P2] Reset the scope before creating groups on a replan retry
When a query with external batch scans reaches `executeWithReplanRetries`
again (for example, an OLAP `E-230` in a mixed query), the failed attempt's
`QueryFinishCleanup` has already closed and cleared this statement scope. The
outer retry retains its `StatementContext` and does not call
`resetConnectorStatementScope`, so this creates fresh task groups in a scope
whose `closed` flag is still true. At successful completion `closeAll()`
immediately returns and the cancellation callbacks are cleared;
`FairTaskExecutor.groups` therefore retains any allocated SPLIT/METADATA groups
for the FE lifetime. Reset the connector scope before the outer replan attempt,
as the inner retry already does, and add a retry test that checks the group
count returns to its baseline.
--
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]