KnightChess commented on code in PR #11347:
URL: https://github.com/apache/hudi/pull/11347#discussion_r1618035707
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/LockManager.java:
##########
@@ -81,12 +85,16 @@ public void lock() {
metrics.startLockApiTimerContext();
if
(!getLockProvider().tryLock(writeConfig.getLockAcquireWaitTimeoutInMs(),
TimeUnit.MILLISECONDS)) {
metrics.updateLockNotAcquiredMetric();
+ if (getLockProvider() instanceof FileSystemBasedLockProvider) {
+ fs.delete(new Path(((FileSystemBasedLockProvider)
getLockProvider()).getLock()), true);
Review Comment:
@xuzifu666 it will cause data quality problems. how about set lock expire
time?
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/LockManager.java:
##########
@@ -81,12 +85,16 @@ public void lock() {
metrics.startLockApiTimerContext();
if
(!getLockProvider().tryLock(writeConfig.getLockAcquireWaitTimeoutInMs(),
TimeUnit.MILLISECONDS)) {
metrics.updateLockNotAcquiredMetric();
+ if (getLockProvider() instanceof FileSystemBasedLockProvider) {
+ fs.delete(new Path(((FileSystemBasedLockProvider)
getLockProvider()).getLock()), true);
Review Comment:
@danny0405 I think `getCurrentOwnerLockInfo` can only identify the lock
trigger, but the trigger is failed, no one can delete the lock file. I think
the better solution is set expire time.
--
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]