You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by xu...@apache.org on 2022/04/22 06:42:00 UTC
[hudi] 02/05: [HUDI-3940] Fix retry count increment in lock manager (#5387)
This is an automated email from the ASF dual-hosted git repository.
xushiyan pushed a commit to branch release-0.11.0
in repository https://gitbox.apache.org/repos/asf/hudi.git
commit 304c5bf20ee6c8c45cb3d03213b52d6ea85530c4
Author: Sagar Sumit <sa...@gmail.com>
AuthorDate: Fri Apr 22 02:22:05 2022 +0530
[HUDI-3940] Fix retry count increment in lock manager (#5387)
---
.../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) {