You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/07/12 10:36:14 UTC

[GitHub] [hive] deniskuzZ commented on a diff in pull request #3428: HIVE-26384: Compactor worker should not stop heartbeat for TXN 0

deniskuzZ commented on code in PR #3428:
URL: https://github.com/apache/hive/pull/3428#discussion_r918814791


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java:
##########
@@ -674,7 +674,9 @@ void wasSuccessful() {
     @Override public void close() throws Exception {
       try {
         //the transaction is about to close, we can stop heartbeating regardless of it's state
-        CompactionHeartbeatService.getInstance(conf).stopHeartbeat(txnId);
+        if (txnId > 0) {

Review Comment:
   I think we should simply move the following check at the beginning of the close() method  
   ````
         if (status == TxnStatus.UNKNOWN) {
           return;
         }
   ````



-- 
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-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org