Apache9 commented on code in PR #5603:
URL: https://github.com/apache/hbase/pull/5603#discussion_r1451069198
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/locking/LockManager.java:
##########
@@ -108,19 +108,10 @@ public MasterLock(final RegionInfo[] regionInfos, final
String description) {
this.description = description;
}
- /**
- * Acquire the lock, waiting indefinitely until the lock is released or
the thread is
- * interrupted.
- * @throws InterruptedException If current thread is interrupted while
waiting for the lock
- */
- public boolean acquire() throws InterruptedException {
- return tryAcquire(0);
- }
-
/**
* Acquire the lock within a wait time.
- * @param timeoutMs The maximum time (in milliseconds) to wait for the
lock, 0 to wait
Review Comment:
In your current implementation, if you set timeout 0, it is possible that we
fail before entering the while loop, if the return value of
EnvironmentEdgeManager.currentTime changes when testing the condition of while
loop...
And could you please check all the references to this method? We need to to
know if this introduces any troubles or breaks our compatibility guarantee...
--
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]