This is an automated email from the ASF dual-hosted git repository.

morrySnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 1470b6c4146 [fix](insert) Avoid formatting generated insert errors 
(#62982)
1470b6c4146 is described below

commit 1470b6c4146d436c82b16523aa1a00f290bb0bee
Author: foxtail463 <[email protected]>
AuthorDate: Tue May 12 11:37:20 2026 +0800

    [fix](insert) Avoid formatting generated insert errors (#62982)
    
    ### What problem does this PR solve?
    
    Problem Summary:
    
    The unhealthy-backend insert failure path passed a generated error
    message as the String.format pattern to ErrorReport. If the generated
    message contains percent signs, reporting can throw a secondary
    formatting exception and hide the original insert failure. Use a fixed
    "%s" pattern and pass the generated message as data.
    
    Co-authored-by: yangtao555 <[email protected]>
---
 .../nereids/trees/plans/commands/insert/AbstractInsertExecutor.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/AbstractInsertExecutor.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/AbstractInsertExecutor.java
index 11bc3e7adc4..add2ab96789 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/AbstractInsertExecutor.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/AbstractInsertExecutor.java
@@ -203,8 +203,8 @@ public abstract class AbstractInsertExecutor {
             coordinator.cancel(new Status(TStatusCode.CANCELLED, "insert 
timeout"));
             if (notTimeout) {
                 errMsg = coordinator.getExecStatus().getErrorMsg();
-                ErrorReport.reportDdlException("there exists unhealthy 
backend. "
-                        + errMsg, ErrorCode.ERR_FAILED_WHEN_INSERT);
+                ErrorReport.reportDdlException("%s", 
ErrorCode.ERR_FAILED_WHEN_INSERT,
+                        "there exists unhealthy backend. " + errMsg);
             } else {
                 ErrorReport.reportDdlException(ErrorCode.ERR_EXECUTE_TIMEOUT);
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to