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

Tsz-wo Sze commented on RATIS-1749:
-----------------------------------

bq. ... Otherwise the new server may receive SHUTDOWN reply.  What is the 
correct practice to add a new node to an existed group?

I see.  Please try adding an empty group and then setConf.  That is what 
runMultiGroupTest does it.  See 
https://github.com/apache/ratis/blob/f2447cfe0b94ad5f9e72dff1623fa90b6f42f4f5/ratis-server/src/test/java/org/apache/ratis/server/impl/GroupManagementBaseTest.java#L319
{code}
      final RaftGroup newGroup = RaftGroup.valueOf(groupId);
{code}


> GroupMismatchException thrown when setConfiguration
> ---------------------------------------------------
>
>                 Key: RATIS-1749
>                 URL: https://issues.apache.org/jira/browse/RATIS-1749
>             Project: Ratis
>          Issue Type: Bug
>          Components: client, raft-group
>    Affects Versions: 2.4.0
>            Reporter: Song Ziyang
>            Priority: Major
>         Attachments: error_stack.log
>
>
> GroupMismatchException occurs when I'm trying to start and add a new server 
> to the group.
> Reproduce steps:
>  # call CompletableFuture.supplyAsync(admin().setConfiguration(newGroup))
>  # call groupManagementApi(newServer).add(group)
> GroupMismatchException happens time to time, as in the attched log.
> I think the setConfiguration here may route the request to the NEW server to 
> be added, since it does not explicitly assign a serverId in request. 
> setConfiguration arrives before addNewGroup, so GroupMismatchException 
> happens.
> [1][https://github.com/apache/ratis/blob/f2447cfe0b94ad5f9e72dff1623fa90b6f42f4f5/ratis-client/src/main/java/org/apache/ratis/client/api/AdminApi.java#L39]
>  
>  
>  



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

Reply via email to