github-actions[bot] commented on code in PR #67328:
URL: https://github.com/apache/doris/pull/67328#discussion_r3900599149


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1652,6 +1707,12 @@ public void executeAndSendResult(boolean isOutfileQuery, 
boolean isSendFields,
                     "cancel fragment query_id:{} cause {}",
                     DebugUtil.printId(context.queryId()), e.getMessage());
             LOG.warn(internalErrorSt.getErrorMsg());
+            if (isOutfileQuery && !outfileCommitted) {
+                abortOutfile(coordBase, atomicOutfile);
+                if (outfileMarkerMayExist) {
+                    deleteOutfileMarker(outFileClause, outfileMarkerBackend);
+                }
+            }
             coordBase.cancel(internalErrorSt);
             // set to null so that the retry logic will generate a new 
coordinator
             this.coord = null;

Review Comment:
   [P1] Do not let atomic OUTFILE enter the generic inner retry here. Atomic 
mode deliberately leaves the MySQL channel unsent, and clearing `this.coord` 
removes the cancelled/timed-out guard, so an original fetch or finalization 
`RpcException` starts a new attempt with regenerated query/fragment IDs. The 
ABORT above is not a quiescence barrier: failures are suppressed, and even an 
OK response drains only callbacks already registered while fragment 
cancellation is asynchronous. The retry can therefore publish the common 
success marker in the same destination while old-attempt files or late cleanup 
are still active. Disable automatic retry for atomic OUTFILE unless attempts 
are namespace-isolated or compensation proves quiescence, and add a 
fault-injection test for this ordering.



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