[ https://issues.apache.org/jira/browse/HIVE-25740?focusedWorklogId=688141&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-688141 ]
ASF GitHub Bot logged work on HIVE-25740: ----------------------------------------- Author: ASF GitHub Bot Created on: 30/Nov/21 16:44 Start Date: 30/Nov/21 16:44 Worklog Time Spent: 10m Work Description: marton-bod commented on a change in pull request #2817: URL: https://github.com/apache/hive/pull/2817#discussion_r759468280 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java ########## @@ -748,6 +736,7 @@ void wasSuccessful() { * @throws Exception */ @Override public void close() throws Exception { + shutdownHeartbeater(); Review comment: Prior to calling commit(), we always set shouldLog=false. If the heartbeater is on 260 after commit has happened, the hms call will still fail but the error won't be logged on the HS2 side. However, the error would still be logged on the HMS side, which is not ideal. Flipping the order to first shut down the heartbeater and then commit/abort would be the only sure solution I think to avoid the HMS-side error log too. -- 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 Issue Time Tracking ------------------- Worklog Id: (was: 688141) Time Spent: 1.5h (was: 1h 20m) > Handle race condition between compaction txn abort/commit and heartbeater > ------------------------------------------------------------------------- > > Key: HIVE-25740 > URL: https://issues.apache.org/jira/browse/HIVE-25740 > Project: Hive > Issue Type: Bug > Reporter: Marton Bod > Assignee: Marton Bod > Priority: Major > Labels: pull-request-available > Time Spent: 1.5h > Remaining Estimate: 0h > > This issue is the following: once the compaction worker finishes, > commitTxn/abortTxn is invoked first, and the heartbeater thread is only > interrupted after that. This can lead to race conditions where the txn has > already been deleted from the backend DB via commit/abort, but the > concurrently running heartbeater thread still attempts to send a last > heartbeat after that, but the txn id won't be found in the DB, leading to > {{{}NoSuchTxnException{}}}. -- This message was sent by Atlassian Jira (v8.20.1#820001)