[
https://issues.apache.org/jira/browse/HIVE-11495?focusedWorklogId=838014&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-838014
]
ASF GitHub Bot logged work on HIVE-11495:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Jan/23 16:23
Start Date: 09/Jan/23 16:23
Worklog Time Spent: 10m
Work Description: 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 838014)
Time Spent: 13.5h (was: 13h 20m)
> Add aborted reason to transaction information.
> ----------------------------------------------
>
> Key: HIVE-11495
> URL: https://issues.apache.org/jira/browse/HIVE-11495
> Project: Hive
> Issue Type: Improvement
> Components: Metastore, Transactions
> Affects Versions: 1.0.0
> Reporter: Eugene Koifman
> Assignee: Sourabh Badhya
> Priority: Major
> Labels: pull-request-available
> Time Spent: 13.5h
> Remaining Estimate: 0h
>
> Add logging messages mentioning the reason to abort the transaction.
> Another reason: Commit can fail due to a conflicting write from another txn
> (since HIVE-13395)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)