sashapolo commented on code in PR #795:
URL: https://github.com/apache/ignite-3/pull/795#discussion_r877997367
##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/CmgRaftGroupListener.java:
##########
@@ -73,15 +81,42 @@ public void onWrite(Iterator<CommandClosure<WriteCommand>>
iterator) {
if (command instanceof WriteStateCommand) {
storage.putClusterState(((WriteStateCommand)
command).clusterState());
+
+ clo.result(null);
} else if (command instanceof JoinRequestCommand) {
- // TODO: perform validation
https://issues.apache.org/jira/browse/IGNITE-16717
+ Serializable response =
validationTokenManager.validateNode((JoinRequestCommand) command);
+
+ clo.result(response);
} else if (command instanceof JoinReadyCommand) {
- storage.putLogicalTopologyNode(((JoinReadyCommand)
command).node());
+ Serializable response =
validationTokenManager.completeValidation((JoinReadyCommand) command);
+
+ // Non-null response means that the node has not passed the
validation step.
+ if (response == null) {
Review Comment:
I agree, the current approach is ugly, I will try to do as you say
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]