SourabhBadhya commented on code in PR #3908: URL: https://github.com/apache/hive/pull/3908#discussion_r1064829545
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java: ########## @@ -1053,7 +1054,16 @@ public void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException, MetaExcept } raiseTxnUnexpectedState(status, txnid); } - abortTxns(dbConn, Collections.singletonList(txnid), true, isReplayedReplTxn); + + if (isReplayedReplTxn) { + errorMsg = TxnErrorMsg.ABORT_REPLAYED_REPL_TXN; + } else if (isHiveReplTxn) { + errorMsg = TxnErrorMsg.ABORT_DEFAULT_REPL_TXN; + } else if (rqst.isSetErrorCode() && rqst.getErrorCode() == TxnErrorMsg.ABORT_ROLLBACK.getErrorCode()) { Review Comment: Updated the condition to - `if (rqst.isSetErrorCode() { errorMsg = TxnErrorMsg.getErrorMsg(rqst.getErrorCode()) }` As far as isReplayedReplTxn is concerned. There was no such intention of keeping it first in if else block. Please note that isReplayedReplTxn & isHiveReplTxn is set only when request is passed through replRollbackTxn() call in the MetastoreClient. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org