You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by vi...@apache.org on 2022/07/18 14:46:01 UTC
[hudi] branch master updated: [HUDI-4409] Improve LockManager wait logic when catch exception (#6122)
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 <96...@qq.com>
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++;
}