vli02 commented on code in PR #5081:
URL: https://github.com/apache/hbase/pull/5081#discussion_r1128903876
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaCache.java:
##########
@@ -459,6 +460,20 @@ public void testUserRegionLockThrowsException() throws
IOException, InterruptedE
assertTrue(client1.getException() instanceof LockTimeoutException
^ client2.getException() instanceof LockTimeoutException);
+
+ // obtain the client metrics
+ MetricsConnection metrics = conn.getConnectionMetrics();
+ long queueCount = metrics.getUserRegionLockQueue().getCount();
+ assertTrue(queueCount == 2);
+
+ long timeoutCount = metrics.getUserRegionLockTimeout().getCount();
+ assertTrue(timeoutCount == 1);
+
+ long waitingTimerCount =
metrics.getUserRegionLockWaitingTimer().getCount();
+ assertTrue(waitingTimerCount == 1);
+
+ long heldTimerCount = metrics.getUserRegionLockHeldTimer().getCount();
Review Comment:
Yes, it is actually always a tiny greater than 2 seconds.
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java:
##########
@@ -1002,7 +1002,7 @@ private RegionLocations locateRegionInMeta(TableName
tableName, byte[] row, bool
}
// Query the meta region
long pauseBase = connectionConfig.getPauseMillis();
- takeUserRegionLock();
+ final long lockStartTime = takeUserRegionLock();
Review Comment:
Yes, let's keep the original type `void` for the function.
--
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]