Skip to content

Commit

Permalink
[Bug Fix] Sink Doris error status(apache#6753)
Browse files Browse the repository at this point in the history
  • Loading branch information
thz committed Apr 25, 2024
1 parent 058f559 commit 462f141
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
throw new DorisConnectorException(
DorisConnectorErrorCode.COMMIT_FAILED, loadResult);
} else {
Expand Down

0 comments on commit 462f141

Please sign in to comment.