You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/05/14 19:44:54 UTC

[GitHub] [hbase] bharathv commented on a change in pull request #3268: HBASE-25032 Do not assign regions to region server which has not call…

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



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
##########
@@ -959,11 +960,19 @@ public void stop() {
 
   /**
    * Creates a list of possible destinations for a region. It contains the online servers, but not
-   *  the draining or dying servers.
-   *  @param serversToExclude can be null if there is no server to exclude
+   * the draining or dying servers.
+   * @param serversToExclude can be null if there is no server to exclude
    */
-  public List<ServerName> createDestinationServersList(final List<ServerName> serversToExclude){
-    final List<ServerName> destServers = getOnlineServersList();
+  public List<ServerName> createDestinationServersList(final List<ServerName> serversToExclude) {
+    Set<ServerName> destServers = new HashSet<>();
+    onlineServers.forEach((sn, sm) -> {
+      if (sm.getLastReportTimestamp() > 0) {
+        // This means we have already called regionServerReport at leaset once, then let's include

Review comment:
       nit: 'least' typo.




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