This is an automated email from the ASF dual-hosted git repository.

vinoyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 1959b843b7 [HUDI-4409] Improve LockManager wait logic when catch 
exception (#6122)
1959b843b7 is described below

commit 1959b843b706babed8c16ee31c6fc266871d709f
Author: liujinhui <[email protected]>
AuthorDate: Mon Jul 18 22:45:52 2022 +0800

    [HUDI-4409] Improve LockManager wait logic when catch exception (#6122)
---
 .../java/org/apache/hudi/client/transaction/lock/LockManager.java    | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/LockManager.java
 
b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/LockManager.java
index ca15c4fdc2..6ebae44fd4 100644
--- 
a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/LockManager.java
+++ 
b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/LockManager.java
@@ -74,6 +74,11 @@ public class LockManager implements Serializable, 
AutoCloseable {
           if (retryCount >= maxRetries) {
             throw new HoodieLockException("Unable to acquire lock, lock object 
", e);
           }
+          try {
+            Thread.sleep(maxWaitTimeInMs);
+          } catch (InterruptedException ex) {
+            // ignore InterruptedException here
+          }
         } finally {
           retryCount++;
         }

Reply via email to