Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RATIS-1635. Support listener in MiniRaftCluster #692

Merged
merged 3 commits into from
Jul 23, 2022

Conversation

codings-dan
Copy link
Contributor

@codings-dan
Copy link
Contributor Author

@szetszwo Could you help review this pull request? Thank you in advance!

Copy link
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codings-dan , thanks for working on this! Just two minor comments inlined.

@@ -39,9 +39,9 @@ public class MiniRaftClusterWithGrpc extends MiniRaftCluster.RpcBase {
public static final Factory<MiniRaftClusterWithGrpc> FACTORY
= new Factory<MiniRaftClusterWithGrpc>() {
@Override
public MiniRaftClusterWithGrpc newCluster(String[] ids, RaftProperties prop) {
public MiniRaftClusterWithGrpc newCluster(String[] ids, String[] ids1, RaftProperties prop) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename all ids1 to listenerIds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

}

public PeerChanges addNewPeers(int number, boolean startNewPeer,
boolean emptyPeer, boolean isListener) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to other code, pass RaftPeerRole instead of isListener.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@codings-dan
Copy link
Contributor Author

@szetszwo PTAL, thank you!

Copy link
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 the change looks good.

@szetszwo szetszwo merged commit 7e69560 into apache:master Jul 23, 2022
@codings-dan codings-dan deleted the 1635 branch July 25, 2022 02:15
@codings-dan
Copy link
Contributor Author

@szetszwo Thanks for helping review and merge the pull request!

codings-dan added a commit that referenced this pull request Jul 26, 2022
symious pushed a commit to symious/ratis that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants