pvary commented on code in PR #3181:
URL: https://github.com/apache/hive/pull/3181#discussion_r843750056


##########
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java:
##########
@@ -574,30 +571,24 @@ public void rollbackTxn() throws LockException {
     if (!isTxnOpen()) {
       throw new RuntimeException("Attempt to rollback before opening a 
transaction");
     }
-    stopHeartbeat();
-
     try {
-      lockMgr.clearLocalLockRecords();
+      clearLocksAndHB();
       LOG.debug("Rolling back " + JavaUtils.txnIdToString(txnId));
-
-      // Re-checking as txn could have been closed, in the meantime, by a 
competing thread.
-      if (isTxnOpen()) {
-        if (replPolicy != null) {
-          getMS().replRollbackTxn(txnId, replPolicy, TxnType.DEFAULT);
-        } else {
-          getMS().rollbackTxn(txnId);
-        }
+      
+      if (replPolicy != null) {

Review Comment:
   If we expect that this class should not be shared between threads, then we 
should write a comment on the class level for it



-- 
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]

Reply via email to