[ https://issues.apache.org/jira/browse/HIVE-25740?focusedWorklogId=689175&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-689175 ]
ASF GitHub Bot logged work on HIVE-25740: ----------------------------------------- Author: ASF GitHub Bot Created on: 02/Dec/21 10:46 Start Date: 02/Dec/21 10:46 Worklog Time Spent: 10m Work Description: marton-bod commented on pull request #2817: URL: https://github.com/apache/hive/pull/2817#issuecomment-984510023 @pvary @klcopp please also note that I've introduced an initial delay (txnTimeout / 4) to heartbeating: ``` heartbeatExecutor.scheduleAtFixedRate(heartbeater, txnTimeout / 4, txnTimeout / 2, TimeUnit.MILLISECONDS); ``` This should reduce the likelihood of these race conditions by not even heartbeating for very short-lived compaction transactions, such as the "Not enough files in ... to compact" scenarios. -- 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: 689175) Time Spent: 2h 50m (was: 2h 40m) > 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: 2h 50m > 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)