924060929 commented on code in PR #69683:
URL: https://github.com/apache/doris/pull/69683#discussion_r4399980326


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/scan/FileQueryScanNode.java:
##########
@@ -418,7 +418,9 @@ public void createScanRangeLocations() throws UserException 
{
             splitAssignment = new SplitAssignment(backendPolicy, this, 
this::splitToScanRange,
                     locationProperties, pathPartitionKeys, admissionResult,
                     sessionVariable.getSplitBatchSize(), 
sessionVariable.getSplitQueueCapacity());
-            splitAssignment.init();
+            // The first split can require a remote read session (for example, 
MaxCompute). Keep
+            // the planning wait bounded by the query's effective timeout 
instead of a fixed 30 seconds.
+            splitAssignment.init(ConnectContext.get().getExecTimeoutS() * 
1000L);

Review Comment:
   Fixed in 1ce495e44b5. FileQueryScanNode now registers the current 
SplitAssignment with StmtExecutor.registerQueryCancellationCallback before 
starting the first producer. Cancellation stops the assignment, wakes init 
immediately, and closes producer resources even when the running producer is a 
plain Runnable in remote IO. After init wakes, the planner throws the 
executor's retained cancellation reason rather than treating the stopped 
assignment as an empty scan. A cancellation that precedes registration is 
handled by the callback handoff and init skips starting more work. 
SplitAssignmentTest covers stopping after the producer starts but before its 
first split (23/23 passed); FE Checkstyle passed.



-- 
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]

Reply via email to