This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new be9ebbc [fix] Fix bug that wrong exception message returned by insert
statement (#7832)
be9ebbc is described below
commit be9ebbc14d05abaadd8bab96c9bd59b37820fa4a
Author: weizuo93 <[email protected]>
AuthorDate: Mon Jan 24 21:11:45 2022 +0800
[fix] Fix bug that wrong exception message returned by insert statement
(#7832)
`insert` statement may return exception message `Execute timeout` after
load data failed.
But the real reason is that there exists unhealthy backend, not execute
timeout.
```
MySQL [ssb]> insert into lineorder_flat select * from lineorder_flat;
ERROR 1105 (HY000): errCode = 2, detailMessage = Execute timeout
```
---
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
index 975ad36..37c1883 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
@@ -1248,10 +1248,15 @@ public class StmtExecutor implements ProfileWriter {
coord.exec();
- coord.join(context.getSessionVariable().getQueryTimeoutS());
+ boolean notTimeout =
coord.join(context.getSessionVariable().getQueryTimeoutS());
if (!coord.isDone()) {
coord.cancel();
-
ErrorReport.reportDdlException(ErrorCode.ERR_EXECUTE_TIMEOUT);
+ if (notTimeout) {
+ errMsg = coord.getExecStatus().getErrorMsg();
+ ErrorReport.reportDdlException("There exists unhealthy
backend. " + errMsg, ErrorCode.ERR_FAILED_WHEN_INSERT);
+ } else {
+
ErrorReport.reportDdlException(ErrorCode.ERR_EXECUTE_TIMEOUT);
+ }
}
if (!coord.getExecStatus().ok()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]