infraio commented on a change in pull request #2322:
URL: https://github.com/apache/hbase/pull/2322#discussion_r484809224



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
##########
@@ -968,6 +968,19 @@ private RegionLocations locateRegionInMeta(TableName 
tableName, byte[] row, bool
     }
   }
 
+  private void takeUserRegionLock() throws IOException {
+    try {
+      long waitTime = connectionConfig.getScannerTimeoutPeriod();
+      if (!userRegionLock.tryLock(waitTime, TimeUnit.MILLISECONDS)) {

Review comment:
       > then in worst case scenario call will fail in 15 (lock timeout) + 15 
(lock timeout 2nd try) + 1 (assuming sleep of 1 second) = 31 seconds
   
   Reread RpcRetryingCallerImpl#callWithRetries code. If callable.prepare throw 
the LockTimeoutException, it will not retry. There are a check about call 
duration and callTimeout in line 156. See 
https://github.com/apache/hbase/blob/branch-2/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.java#L156




----------------------------------------------------------------
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.

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


Reply via email to