Hello,

I am new to Apache Ratis and Raft and have been learning a lot through
trial and error. One scenario I am dealing with is membership change.
I see in the documentation it specifies

Start the new peer N3 with EMPTY group.

        RaftServer N3 = RaftServer.newBuilder()
            .setGroup(RaftGroup.emptygroup())
            .setProperties(properties)
            .setServerId(n3id)
            .setStateMachine(userStateMachine)
            .build();
        N3.start()

The group is RaftGroup.emptyGroup())

The example code conflicts with this as well

https://github.com/apache/ratis/blob/master/ratis-examples/src/main/java/org/apache/ratis/examples/membership/server/RaftCluster.java#L80

        // New peer always start with an empty group.
        RaftGroup group = RaftGroup.valueOf(GROUP_ID);

which is a raft group with matching group id but no peers.

So when we are saying empty group, do we mean a RaftGroup with no
peers, and does the group id matter? Should it match the group id that
the peer is joining?

Thanks,

Sahith

Reply via email to