codope commented on issue #5702: URL: https://github.com/apache/hudi/issues/5702#issuecomment-1201082582
> I think it's because tryLock returns false when this.lock object was created, but not in LockState.ACQUIRED state That's correct! > this.lock is never reset between retries, so when Lock manager calls tryLock for the second time the validation fails This is not always the case. After `tryLock` returns false in the first attempt (when this.lock object was created, but not in LockState.ACQUIRED state), then `LockManager` will sleep for some time and try again https://github.com/apache/hudi/blob/master/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/LockManager.java#L72 But the real problem is that we don't reset the lock in this case. https://github.com/apache/hudi/blob/master/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/transaction/lock/HiveMetastoreBasedLockProvider.java#L198-L200 We should fix this. HUDI-4518 to track this. -- 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]
