-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
feature: support raft mode registry to namingserver #7114
Conversation
please add signature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -156,6 +156,9 @@ public void register(Instance instance) throws Exception { | |||
doRegister(instance, getNamingAddrs()); | |||
} | |||
|
|||
public void doRegister(List<Instance> instance, List<String> urlList) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this method is not implemented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a reserved interface because, when multi-raft is implemented, a node will have multiple instances.
@@ -152,7 +154,9 @@ public Result<String> createGroup(String namespace, String vGroup, String cluste | |||
LOGGER.error("no instance in cluster {}", clusterName); | |||
return new Result<>("301", "no instance in cluster" + clusterName); | |||
} else { | |||
Node node = nodeList.get(0); | |||
Node node = | |||
nodeList.stream().filter(n -> n.getRole() == ClusterRole.LEADER || n.getRole() == ClusterRole.MEMBER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why leader and memeber can be selected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a Raft cluster, you need to find the leader to create the group, whereas for a regular cluster, you need to find a member to create the group.
Maybe we can add some example to show how to config raft mode of namingserver? |
Integration testing is required, but the Seata repository currently does not support it. However, you can compile the code locally and test it using a combination of client, server, and naming server. |
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews