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

Tsz Wo Nicholas Sze commented on RATIS-100:
-------------------------------------------

> ... Is it possible that no new leader can be elected is because we are using 
> reinitialize API for old peers? For these peers we should call 
> setConfiguration instead of reinitialize.

We are already using setConfiguration for old peers and reinitialize for new 
peers.
{code}
//ReinitializationBaseTest.runTestReinitializeMultiGroups

    // update chosen group to use all the peers
    final RaftPeer[] array = allPeers.toArray(RaftPeer.EMPTY_PEERS);
    for(int i = 0; i < groups.length; i++) {
      LOG.info(i + ") update " + cluster.printServers(groups[i].getGroupId()));
      if (i == chosen) {
        try (final RaftClient client = cluster.createClient(null, groups[i])) {
          client.setConfiguration(array);
        }
      } else {
        for(RaftPeer p : groups[i].getPeers()) {
          try (final RaftClient client = cluster.createClient(p.getId(), 
groups[i])) {
            client.reinitialize(array, p.getId());
          }
        }
      }
    }
{code}


> Test multiple raft groups with a state machine
> ----------------------------------------------
>
>                 Key: RATIS-100
>                 URL: https://issues.apache.org/jira/browse/RATIS-100
>             Project: Ratis
>          Issue Type: Test
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>         Attachments: r100_20170804.patch
>
>
> We propose to add a test similar to 
> ReinitializationBaseTest.runTestReinitializeMultiGroups(..) with a state 
> machine so that it can test if the states are recorded correctly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to