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

xushiyan pushed a commit to branch rc3-patched-for-test
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/rc3-patched-for-test by this 
push:
     new 19ab56492f [HUDI-3940] Fix retry count increment in lock manager
19ab56492f is described below

commit 19ab56492f1ab70938e91980548d5e24bf4e7367
Author: Sagar Sumit <[email protected]>
AuthorDate: Thu Apr 21 21:36:27 2022 +0530

    [HUDI-3940] Fix retry count increment in lock manager
---
 .../main/java/org/apache/hudi/client/transaction/lock/LockManager.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 913736cad8..ca15c4fdc2 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
@@ -70,11 +70,12 @@ public class LockManager implements Serializable, 
AutoCloseable {
           }
           LOG.info("Retrying to acquire lock...");
           Thread.sleep(maxWaitTimeInMs);
-          retryCount++;
         } catch (HoodieLockException | InterruptedException e) {
           if (retryCount >= maxRetries) {
             throw new HoodieLockException("Unable to acquire lock, lock object 
", e);
           }
+        } finally {
+          retryCount++;
         }
       }
       if (!acquired) {

Reply via email to