This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 71c361aae65 [fix](insert) fix forget to abort txn when insert
checkStrictMode failed (#34612)
71c361aae65 is described below
commit 71c361aae65e5fffb361cdb191a533f3bcfd6511
Author: Xin Liao <[email protected]>
AuthorDate: Fri May 10 10:42:58 2024 +0800
[fix](insert) fix forget to abort txn when insert checkStrictMode failed
(#34612)
---
.../trees/plans/commands/insert/AbstractInsertExecutor.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 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 9e81bc2d1f2..e285ee57bb9 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
@@ -163,16 +163,14 @@ public abstract class AbstractInsertExecutor {
}
}
- private boolean checkStrictMode() {
+ private void checkStrictMode() throws Exception {
// if in strict mode, insert will fail if there are filtered rows
if (ctx.getSessionVariable().getEnableInsertStrict()) {
if (filteredRows > 0) {
- ctx.getState().setError(ErrorCode.ERR_FAILED_WHEN_INSERT,
- "Insert has filtered data in strict mode,
tracking_url=" + coordinator.getTrackingUrl());
- return false;
+ ErrorReport.reportDdlException("Insert has filtered data in
strict mode",
+ ErrorCode.ERR_FAILED_WHEN_INSERT);
}
}
- return true;
}
/**
@@ -182,9 +180,7 @@ public abstract class AbstractInsertExecutor {
beforeExec();
try {
execImpl(executor, jobId);
- if (!checkStrictMode()) {
- return;
- }
+ checkStrictMode();
int retryTimes = 0;
while (retryTimes < Config.mow_insert_into_commit_retry_times) {
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]