linliu-code commented on code in PR #18439:
URL: https://github.com/apache/hudi/pull/18439#discussion_r3190061697
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/StorageBasedLockProvider.java:
##########
@@ -480,12 +480,26 @@ private synchronized boolean tryExpireCurrentLock(boolean
fromShutdownHook) {
Pair<LockUpsertResult, Option<StorageLockFile>> result;
long lockExpirationTimeMs = System.currentTimeMillis();
result = this.storageLockClient.tryUpsertLockFile(expiredLockData,
Option.of(this.getLock()));
+ if (result.getLeft() == LockUpsertResult.THROTTLED && !fromShutdownHook) {
+ logger.warn("Owner {}: Lock expiration write was throttled, retrying
after 1 second.", ownerId);
+ try {
+ TimeUnit.SECONDS.sleep(1);
+ } catch (InterruptedException ie) {
+ Thread.currentThread().interrupt();
+ }
+ result = this.storageLockClient.tryUpsertLockFile(expiredLockData,
Option.of(this.getLock()));
+ }
switch (result.getLeft()) {
case UNKNOWN_ERROR:
Review Comment:
outdated comments.
--
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]