Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ratis-docs/src/site/markdown/membership-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Be careful to keep both separate majorities online!

To add a new node (e.g., `N3`) to an existing group (e.g., `N0`, `N1`, `N2`), follow these steps:

1. Start the new peer `N3` with **EMPTY** group.
1. Start the new peer `N3` with the existing groupId and provide an empty list of peers.

```java
RaftServer N3 = RaftServer.newBuilder()
.setGroup(RaftGroup.emptygroup())
.setGroup(RaftGroup.valueOf(groupId, Collections.emptyList()))
.setProperties(properties)
.setServerId(n3id)
.setStateMachine(userStateMachine)
Expand All @@ -52,8 +52,8 @@ To add a new node (e.g., `N3`) to an existing group (e.g., `N0`, `N1`, `N2`), fo
```

2. Invoke a `setConfiguration` method in the [AdminApi](
../../../../ratis-client/src/main/java/org/apache/ratis/client/api/AdminApi.java#L44)
with the new group as the parameter.
../../../../ratis-client/src/main/java/org/apache/ratis/client/api/AdminApi.java#L44)
on the existing cluster with the new list of peers as the parameter.
It will wait for the new peer to catch up before returning the reply.
```java
reply = client.admin().setConfiguration(List.of(N0, N1, N2, N3))
Expand Down
Loading