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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/DeleteFromCommand.java:
##########
@@ -212,7 +212,8 @@ public void run(ConnectContext ctx, StmtExecutor executor) 
throws Exception {
                 return;
             } catch (Exception e2) {
                 LOG.warn("delete from command failed", e2);
-                throw e;
+                // Preserve both failure causes so the fallback execution 
error is not masked.
+                throw buildDeleteFallbackException(e, e2);

Review Comment:
   [P2] Preserve the fallback's typed error through retry
   
   A retryable cloud insert failure reaches this catch as the original 
`DdlException` (for example `ERR_FAILED_WHEN_INSERT`, code 5025). Wrapping `e2` 
as Nereids `AnalysisException` makes `StmtExecutor` take the generic command 
branch and later recreate the retry as a plain `UserException`; after retry 
exhaustion the client therefore gets 1105 instead of 5025. The direct and 
MOW-light-delete `DeleteFromUsingCommand` paths preserve the original type. 
Please keep the fallback throwable/type and code as primary (for example, 
suppress `e` onto `e2` before rethrowing it), or otherwise preserve its 
`UserException` state while combining the diagnostics. Please also add a 
command/`StmtExecutor`-boundary test: the new reflection-only tests never 
execute this catch and would stay green if line 216 reverted to `throw e`.



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