You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/04/21 16:11:17 UTC

[GitHub] [hudi] alexeykudinkin commented on a diff in pull request #5387: [HUDI-3940] Fix retry count increment in lock manager

alexeykudinkin commented on code in PR #5387:
URL: https://github.com/apache/hudi/pull/5387#discussion_r855360523


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/LockManager.java:
##########
@@ -70,11 +70,12 @@ public void lock() {
           }
           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++;

Review Comment:
   No need to address in this PR, but it's better to increment the count _before_ the attempt



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org