-
Notifications
You must be signed in to change notification settings - Fork 136
IGNITE-16717 Implement node validation #795
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
Conversation
6f71818 to
a286f6d
Compare
c17e14a to
81715e2
Compare
...rationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java
Show resolved
Hide resolved
...rationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java
Outdated
Show resolved
Hide resolved
...rationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java
Outdated
Show resolved
Hide resolved
...anagement/src/main/java/org/apache/ignite/internal/cluster/management/LocalStateStorage.java
Outdated
Show resolved
Hide resolved
...t/src/main/java/org/apache/ignite/internal/cluster/management/raft/CmgRaftGroupListener.java
Outdated
Show resolved
Hide resolved
| private final byte major; | ||
|
|
||
| /** Minor version number. */ | ||
| private final byte minor; |
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 are we restricting version components with byte? Is it imposed by the semver spec? If not, let's make it int just in case.
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.
I copied this part from Ignite 2. I'd prefer to leave it as a byte for now
modules/core/src/main/java/org/apache/ignite/internal/properties/IgniteProductVersion.java
Outdated
Show resolved
Hide resolved
modules/core/src/main/java/org/apache/ignite/internal/properties/IgniteProductVersion.java
Outdated
Show resolved
Hide resolved
| * Extracts the local state (if any) and starts the CMG. | ||
| * | ||
| * @return Future that resolves into the CMG Raft service or {@code null} if the local state is empty. | ||
| * @return Future, that resolves into the CMG Raft service, or {@code null} if the local state is empty. |
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.
Would they really put that comma after 'Future' in English?
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.
I've put these commas to emphasize the fact that the future itself can be null and it will not resolve to a null value
| ValidationError validationError = NodeValidator.validateNode(state, validationInfo); | ||
|
|
||
| if (validationError != null) { | ||
| throw new IgniteInternalException(validationError.rejectReason()); |
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.
Should a specific exception class be introduced for self-validation failures?
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.
I don't know, why?
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.
Actually this is also no longer valid, I've reworked self-validation to work in the same way as the other validation
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.
It could make diagnostics a bit easier by adding some context: not just 'why it failed', but also 'what failed'.
modules/api/src/main/java/org/apache/ignite/IgnitionManager.java
Outdated
Show resolved
Hide resolved
...integrationTest/java/org/apache/ignite/internal/cluster/management/ItClusterManagerTest.java
Show resolved
Hide resolved
...rationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java
Outdated
Show resolved
Hide resolved
| Collection<String> cmgNodeNames, | ||
| String clusterName | ||
| ) { | ||
| if (metaStorageNodeNames.isEmpty()) { |
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.
Please check my comment about params validation in IgnitionManager.
...src/main/java/org/apache/ignite/internal/cluster/management/raft/ValidationTokenManager.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/ignite/internal/cluster/management/raft/ValidationTokenManager.java
Outdated
Show resolved
Hide resolved
...management/src/main/java/org/apache/ignite/internal/cluster/management/rest/InitCommand.java
Show resolved
Hide resolved
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
Show resolved
Hide resolved
...ent/src/main/java/org/apache/ignite/internal/cluster/management/raft/RaftStorageManager.java
Show resolved
Hide resolved
3d40358 to
993ee6d
Compare
98e23c5 to
6b996f8
Compare
GG-39353 Handle VacuumTxStatesCommand --------- Co-authored-by: Kirill Sizov <sizov.kirill.y@gmail.com>
https://issues.apache.org/jira/browse/IGNITE-16717