[ https://issues.apache.org/jira/browse/HIVE-12366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15102193#comment-15102193 ]
Eugene Koifman commented on HIVE-12366: --------------------------------------- [~wzheng] on more comment on (DbTxnManager) {noformat} + @Override + public void releaseLocks(List<HiveLock> hiveLocks) throws LockException { + HiveLockManager lockManager = this.getLockManager(); + lockManager.releaseLocks(hiveLocks); + stopHeartbeat(); + } {noformat} I think it should look like this 1. don't need to init LM as it should already be there 2. stop heartbeat first to prevent possibly heartbeating after release (same as commit/rollback methods) {noformat} public void releaseLocks(List<HiveLock> hiveLocks) throws LockException { if (lockMgr != null) { stopHeartbeat(); lockMgr.releaseLocks(hiveLocks); } } {noformat} > Refactor Heartbeater logic for transaction > ------------------------------------------ > > Key: HIVE-12366 > URL: https://issues.apache.org/jira/browse/HIVE-12366 > Project: Hive > Issue Type: Bug > Components: Transactions > Reporter: Wei Zheng > Assignee: Wei Zheng > Attachments: HIVE-12366.1.patch, HIVE-12366.11.patch, > HIVE-12366.12.patch, HIVE-12366.13.patch, HIVE-12366.14.patch, > HIVE-12366.2.patch, HIVE-12366.3.patch, HIVE-12366.4.patch, > HIVE-12366.5.patch, HIVE-12366.6.patch, HIVE-12366.7.patch, > HIVE-12366.8.patch, HIVE-12366.9.patch > > > Currently there is a gap between the time locks acquisition and the first > heartbeat being sent out. Normally the gap is negligible, but when it's big > it will cause query fail since the locks are timed out by the time the > heartbeat is sent. > Need to remove this gap. -- This message was sent by Atlassian JIRA (v6.3.4#6332)