From 4c2f4784a4d1ee90958a6735379627c1fb21a855 Mon Sep 17 00:00:00 2001 From: foxtail463 Date: Tue, 12 May 2026 11:37:20 +0800 Subject: [PATCH] [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 --- .../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 39a7381afcf797..8c0ac00b9618fa 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 @@ -201,8 +201,8 @@ protected final void execImpl(StmtExecutor executor) throws Exception { 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); }