deniskuzZ commented on code in PR #5841:
URL: https://github.com/apache/hive/pull/5841#discussion_r2189234576
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -513,23 +516,53 @@ public long getTargetTxnId(String replPolicy, long
sourceTxnId) throws MetaExcep
@Override
public void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException,
MetaException, TxnAbortedException {
+ List<TxnWriteDetails> txnWriteDetails = new ArrayList<>();
+ if (transactionalListeners != null) {
+ //Find the write details for this transaction.
+ //Doing it here before the metadata tables are updated below.
+ txnWriteDetails = getWriteIdsForTxnID(rqst.getTxnid());
Review Comment:
let me check this further, but why not reuse existing code
````
@Override
public void abort_txn(AbortTxnRequest rqst) throws TException {
List<WriteEventInfo> writeEventInfo =
getMS().getAllWriteEventInfo(rqst.getTxnid(), "*", "*");
rqst.setWriteEventInfo(writeEventInfo);
getTxnHandler().abortTxn(rqst);
````
@harshal-16 is that sufficient for you?
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -513,23 +516,53 @@ public long getTargetTxnId(String replPolicy, long
sourceTxnId) throws MetaExcep
@Override
public void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException,
MetaException, TxnAbortedException {
+ List<TxnWriteDetails> txnWriteDetails = new ArrayList<>();
+ if (transactionalListeners != null) {
+ //Find the write details for this transaction.
+ //Doing it here before the metadata tables are updated below.
+ txnWriteDetails = getWriteIdsForTxnID(rqst.getTxnid());
Review Comment:
let me check this further, but why not reuse existing code?
````
@Override
public void abort_txn(AbortTxnRequest rqst) throws TException {
List<WriteEventInfo> writeEventInfo =
getMS().getAllWriteEventInfo(rqst.getTxnid(), "*", "*");
rqst.setWriteEventInfo(writeEventInfo);
getTxnHandler().abortTxn(rqst);
````
@harshal-16 is that sufficient for you?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]