infraio commented on a change in pull request #2322:
URL: https://github.com/apache/hbase/pull/2322#discussion_r483046581
##########
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:
Got your case. I thought the problem is if lock timeout, the 2nd retry
need to consider this case and should not retry.
Let me give a example about the rpc timeout (configed as 4 secs) and
operation timeout(configed as 10 secs). The rpc timeout maybe reset when the
remaining time is less than rpc timeout.
1. rpc call with 4 secs timeout.
2. retry call with 4 secs timeout.
3. retry call with 2 secs timeout which equals 10 - 4 - 4.
For this case, we need same guarantee. If the remaining time is zero, it
should not to retry. I thought this is the right way to fix this problem.
Thanks.
----------------------------------------------------------------
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]