wombatu-kun commented on code in PR #19370:
URL: https://github.com/apache/hudi/pull/19370#discussion_r3644671114


##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/transaction/lock/HiveMetastoreBasedLockProvider.java:
##########
@@ -187,6 +195,7 @@ public boolean acquireLock(long time, TimeUnit unit, final 
LockComponent compone
   private void acquireLockInternal(long time, TimeUnit unit, LockComponent 
lockComponent)
       throws InterruptedException, ExecutionException, TimeoutException, 
TException {
     LockRequest lockRequest = null;
+    lockLostRemotely = false;

Review Comment:
   Covered by #19371, which deletes the branch outright rather than fixing the 
`checkLock` argument. It rewrites these same lines, so whichever of the two 
lands second needs a rebase.



##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/transaction/lock/HiveMetastoreBasedLockProvider.java:
##########
@@ -132,12 +136,16 @@ public void unlock() {
       log.info(generateLogStatement(RELEASING, generateLogSuffixString()));
       LockResponse lockResponseLocal = lock;
       if (lockResponseLocal == null) {
+        if (lockLostRemotely) {
+          // The heartbeat already dropped the lock. Unlocking it would fail 
with a bare
+          // NoSuchLockException anyway, so fail with the actual reason 
instead.
+          throw new 
HoodieLockException(generateLogStatement(FAILED_TO_RELEASE, 
generateLogSuffixString())

Review Comment:
   Done 26c8161d43ad.



-- 
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]

Reply via email to