[ 
https://issues.apache.org/jira/browse/HBASE-28180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17780902#comment-17780902
 ] 

Duo Zhang commented on HBASE-28180:
-----------------------------------

After reviewing the code, I think the problem here is that, we will not create 
ServerStateNode when registering a region server, so we can not rely on whether 
ServerStateNode exists to avoid scheduling unnecessary SCPs. The problem can be 
fixed after we finishe the TODO of the comments for getOrCreateServer

{code}
  /**
   * Be judicious calling this method. Do it on server register ONLY otherwise 
you could mess up
   * online server accounting. TOOD: Review usage and convert to {@link 
#getServerNode(ServerName)}
   * where we can.
   */
  public ServerStateNode getOrCreateServer(final ServerName serverName) {
    return serverMap.computeIfAbsent(serverName, key -> new 
ServerStateNode(key));
  }
{code}

> Review the usage of RegionStates.getOrCreateServer
> --------------------------------------------------
>
>                 Key: HBASE-28180
>                 URL: https://issues.apache.org/jira/browse/HBASE-28180
>             Project: HBase
>          Issue Type: Bug
>          Components: master
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>            Priority: Major
>         Attachments: 
> org.apache.hadoop.hbase.master.TestClusterRestartFailover-output.txt
>
>
> It failed two times in this PR.
> https://github.com/apache/hbase/pull/5475
> Filed an issue to track this problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to