taohaozhi1129 commented on code in PR #6755:
URL: https://github.com/apache/seatunnel/pull/6755#discussion_r1581991392


##########
seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/committer/DorisCommitter.java:
##########
@@ -116,8 +116,11 @@ private void commitTransaction(DorisCommitInfo committable)
             String loadResult = EntityUtils.toString(response.getEntity());
             Map<String, String> res =
                     mapper.readValue(loadResult, new 
TypeReference<HashMap<String, String>>() {});
-            if (res.get("status").equals(LoadStatus.FAIL)
-                    && !ResponseUtil.isCommitted(res.get("msg"))) {
+            if (!LoadStatus.SUCCESS.equals(res.get("status"))) {
+                log.error("commit transaction error url:{},TxnId:{},result:{}",
+                        String.format(COMMIT_PATTERN, hostPort, 
committable.getDb()),
+                        committable.getTxbID(),
+                        loadResult);

Review Comment:
   @Hisoka-X 
   When synchronizing data to Doris in a 2PC (Two-Phase Commit) scenario, there 
might be a situation where Doris returns a status of ANALYSIS_ERROR instead of 
Fail or other content. In such cases, the existing condition check will not 
work, and it may mistakenly assume that the commit was successful when it 
actually failed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to