n3nash commented on a change in pull request #3186:
URL: https://github.com/apache/hudi/pull/3186#discussion_r662772764
##########
File path:
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveMetastoreBasedLockProvider.java
##########
@@ -192,6 +192,11 @@ private void acquireLockInternal(long time, TimeUnit unit,
LockComponent lockCom
throw e;
}
}
+ } finally {
+ // it is better to release WAITING lock, otherwise hive lock will hang
forever
+ if (this.lock != null && this.lock.getState() != LockState.ACQUIRED) {
+ hiveClient.unlock(this.lock.getLockid());
Review comment:
Does this hiveClient.unlock(id) throw an exception that the lock is not
acquired ? In the test case below, are you generating this scenario where the
LOCK is in WAITING stage and you try to release 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]