ivanzlenko commented on code in PR #6549:
URL: https://github.com/apache/ignite-3/pull/6549#discussion_r2344016786
##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/CmgRaftService.java:
##########
@@ -148,10 +149,18 @@ public CompletableFuture<Void>
startJoinCluster(ClusterTag clusterTag, NodeAttri
return raftService.run(command, RaftCommandRunner.NO_TIMEOUT)
.thenAccept(response -> {
if (response instanceof ValidationErrorResponse) {
- throw new
JoinDeniedException(((ValidationErrorResponse) response).reason());
+ var validationErrorResponse =
(ValidationErrorResponse) response;
+
+ if (validationErrorResponse.isInvalidNodeConfig()) {
+ var invalidNodeConfigurationException = new
InvalidNodeConfigurationException(validationErrorResponse.reason());
+
+ throw new
JoinDeniedException(invalidNodeConfigurationException.code(),
invalidNodeConfigurationException);
Review Comment:
Given it is a very old code and was created before some
IgniteInternalException constructors got deprecated and error codes got
introduced - let's fix this issue.
I propose to add correct error code for JoinDeniedException and add new
constructor passing only error message and cause.
--
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]