huaxiangsun commented on a change in pull request #2726:
URL: https://github.com/apache/hbase/pull/2726#discussion_r539488382



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/CatalogReplicaLoadBalanceSimpleSelector.java
##########
@@ -262,16 +261,16 @@ private void cleanupReplicaReplicaStaleCache() {
   private int refreshCatalogReplicaCount() {
     int newNumOfReplicas = this.getNumOfReplicas.getAsInt();
     LOG.debug("Refreshed replica count {}", newNumOfReplicas);
-    if (newNumOfReplicas == 1) {
-      LOG.warn("Table {}'s region replica count is 1, maybe a misconfiguration 
or failure to "
-        + "fetch the replica count", tableName);
+    // If the returned number of replicas is -1, it is caused by failure to 
fetch the
+    // replica count. Do not update the numOfReplicas in this case.
+    if (newNumOfReplicas == 
CatalogReplicaLoadBalanceSelector.UNINITIALIZED_NUM_OF_REPLICAS) {
+      LOG.error("Failed to fetch Table {}'s region replica count", tableName);

Review comment:
       Currently, it is logged every 2 minutes.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to