bharathv commented on a change in pull request #3601:
URL: https://github.com/apache/hbase/pull/3601#discussion_r694352064



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegistryEndpointsRefresher.java
##########
@@ -60,9 +63,20 @@ public synchronized void stop() {
     notifyAll();
   }
 
+  private long getRefreshIntervalMs(boolean firstRefresh) {
+    if (refreshNow) {
+      return minTimeBetweenRefreshesMs;
+    }
+    if (firstRefresh) {

Review comment:
       I think this works ok for a large cluster once we populate the stubs of 
all the bootstrap nodes. But for a smaller cluster (<=10), populateStubs() 
returns everything. So its likely that even after the first refresh, all the 
subsequent refreshes hit the same bunch of nodes at the same time. 
   
   It looks to me like the right way to fix this is to add jitter to the 
refreshTime? jitter is a random sleep between (0, n) so that we spread out the 
calls, this is for _all_ the refreshes and not just the first refresh, WDYT? 




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