Skip to content

Commit

Permalink
[Bug Fix] Sink Doris error status(#6753) (#6755)
Browse files Browse the repository at this point in the history
  • Loading branch information
taohaozhi1129 committed Apr 29, 2024
1 parent 53c8957 commit 0ce2c0f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,12 @@ 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);
throw new DorisConnectorException(
DorisConnectorErrorCode.COMMIT_FAILED, loadResult);
} else {
Expand Down

0 comments on commit 0ce2c0f

Please sign in to comment.