jsbali commented on code in PR #6502:
URL: https://github.com/apache/hudi/pull/6502#discussion_r965475615


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/LockManager.java:
##########
@@ -64,13 +69,18 @@ public void lock() {
       boolean acquired = false;
       while (retryCount <= maxRetries) {
         try {
+          metrics.startLockApiTimerContext();
           acquired = 
lockProvider.tryLock(writeConfig.getLockAcquireWaitTimeoutInMs(), 
TimeUnit.MILLISECONDS);
           if (acquired) {
+            metrics.updateLockAcquiredMetric();
+            metrics.startLockHeldTimerContext();

Review Comment:
   "updateLockAcquiredMetric" has a parallel function also 
"updateLockNotAcquiredMetricis" is the reason I have kept them separate. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to