wchevreuil commented on code in PR #5258:
URL: https://github.com/apache/hbase/pull/5258#discussion_r1211372264


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java:
##########
@@ -1008,9 +1008,11 @@ private RegionLocations locateRegionInMeta(TableName 
tableName, byte[] row, bool
       }
       // Query the meta region
       long pauseBase = connectionConfig.getPauseMillis();
-      takeUserRegionLock();
       final long lockStartTime = EnvironmentEdgeManager.currentTime();

Review Comment:
   this should be right after the `takeUserRegionLock()`call.



##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java:
##########
@@ -1008,9 +1008,11 @@ private RegionLocations locateRegionInMeta(TableName 
tableName, byte[] row, bool
       }
       // Query the meta region
       long pauseBase = connectionConfig.getPauseMillis();
-      takeUserRegionLock();
       final long lockStartTime = EnvironmentEdgeManager.currentTime();
+      boolean lockedUserRegion = false;
       try {
+        takeUserRegionLock();

Review Comment:
   I don't see much difference in the overall behaviour by just bring the lock 
acquisition inside the try. It lock acquiring fails, we are still halting the 
flow, and not really doing anything extra in the finally block.



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

Reply via email to