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

Ted Yu commented on HBASE-8344:
-------------------------------

{code}
+            FavoredNodes.Position position =
+                FavoredNodes.getFavoredServerPosition(favoredNodes, s);
+            if (position.equals(Position.PRIMARY)) {
+              primaryHost = serverWithLegitStartCode;
{code}
If favoredNodes.size() >= FavoredNodeAssignmentHelper.FAVORED_NODES_NUM, 
getFavoredServerPosition() would return null.
The if check in above snippet would become:
{code}
null.equals(Position.PRIMARY)
{code}
I think the following should be used:
{code}
+            if (Position.PRIMARY.equals(position)) {
{code}
                
> Improve the assignment when node failures happen to choose the secondary RS 
> as the new primary RS
> -------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-8344
>                 URL: https://issues.apache.org/jira/browse/HBASE-8344
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Devaraj Das
>            Assignee: Devaraj Das
>            Priority: Critical
>             Fix For: 0.95.2
>
>         Attachments: hbase-8344-1.txt, hbase-8344-2.1.txt, 
> hbase-8344-2.2.txt, hbase-8344-2.3.txt, hbase-8344-2.4.txt
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to