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

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 059fe688c75 (fix)[insert] fix insert into lose data #29802 (#29813)
059fe688c75 is described below

commit 059fe688c759578bd86c588d170431d89fec6f26
Author: HHoflittlefish777 <[email protected]>
AuthorDate: Wed Jan 10 21:35:59 2024 +0800

    (fix)[insert] fix insert into lose data #29802 (#29813)
---
 .../src/main/java/org/apache/doris/qe/Coordinator.java | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
index 31c609bcc5a..f915a2f136b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
@@ -2226,7 +2226,14 @@ public class Coordinator implements CoordInterface {
                         status.getErrorMsg());
                 updateStatus(status, params.getFragmentInstanceId());
             }
-            if 
(ctx.fragmentInstancesMap.get(params.fragment_instance_id).getIsDone()) {
+
+            // params.isDone() should be promised.
+            // There are some periodic reports during the load process,
+            // and the reports from the intermediate process may be concurrent 
with the last report.
+            // The last report causes the counter to decrease to zero,
+            // but it is possible that the report without commit-info 
triggered the commit operation,
+            // resulting in the data not being published.
+            if 
(ctx.fragmentInstancesMap.get(params.fragment_instance_id).getIsDone() && 
params.isDone()) {
                 if (params.isSetDeltaUrls()) {
                     updateDeltas(params.getDeltaUrls());
                 }
@@ -2278,7 +2285,14 @@ public class Coordinator implements CoordInterface {
                         status.getErrorMsg());
                 updateStatus(status, params.getFragmentInstanceId());
             }
-            if (execState.done) {
+
+            // params.isDone() should be promised.
+            // There are some periodic reports during the load process,
+            // and the reports from the intermediate process may be concurrent 
with the last report.
+            // The last report causes the counter to decrease to zero,
+            // but it is possible that the report without commit-info 
triggered the commit operation,
+            // resulting in the data not being published.
+            if (execState.done && params.isDone()) {
                 if (params.isSetDeltaUrls()) {
                     updateDeltas(params.getDeltaUrls());
                 }


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

Reply via email to