IGNITE-28731 Create cluster auto activation plugin - #355
Open
DenisPolo wants to merge 5 commits into
Open
Conversation
chesnokoff
reviewed
Jun 24, 2026
DenisPolo
force-pushed
the
ignite-28731
branch
2 times, most recently
from
June 24, 2026 08:09
e1ba8c9 to
426bd4b
Compare
chesnokoff
reviewed
Jun 24, 2026
chesnokoff
reviewed
Jun 24, 2026
chesnokoff
reviewed
Jun 24, 2026
chesnokoff
reviewed
Jun 24, 2026
chesnokoff
reviewed
Jun 24, 2026
chesnokoff
reviewed
Jun 24, 2026
chesnokoff
reviewed
Jun 24, 2026
chesnokoff
reviewed
Jun 24, 2026
chesnokoff
reviewed
Jul 13, 2026
chesnokoff
reviewed
Jul 13, 2026
added 4 commits
August 6, 2026 13:49
DenisPolo
force-pushed
the
ignite-28731
branch
from
August 11, 2026 03:14
0d6b493 to
115b23d
Compare
chesnokoff
suggested changes
Aug 11, 2026
chesnokoff
suggested changes
Aug 19, 2026
chesnokoff
left a comment
Contributor
There was a problem hiding this comment.
Many tests repeat the same node startup sequence and cluster state checks. Can we extract common helper methods for starting configured nodes and checking the expected state? This would make the individual test scenarios shorter and easier to understand
Comment on lines
+44
to
+57
| @Override public boolean apply(Collection<ClusterNode> nodes) { | ||
| Set<String> missingNodes = new HashSet<>(requiredNodes); | ||
|
|
||
| for (ClusterNode node : nodes) { | ||
| String nodeConsistentId = node.consistentId().toString(); | ||
|
|
||
| missingNodes.remove(nodeConsistentId); | ||
|
|
||
| if (missingNodes.isEmpty()) | ||
| break; | ||
| } | ||
|
|
||
| return missingNodes.isEmpty(); | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| @Override public boolean apply(Collection<ClusterNode> nodes) { | |
| Set<String> missingNodes = new HashSet<>(requiredNodes); | |
| for (ClusterNode node : nodes) { | |
| String nodeConsistentId = node.consistentId().toString(); | |
| missingNodes.remove(nodeConsistentId); | |
| if (missingNodes.isEmpty()) | |
| break; | |
| } | |
| return missingNodes.isEmpty(); | |
| } | |
| @Override public boolean apply(Collection<ClusterNode> nodes) { | |
| Set<String> missingNodes = new HashSet<>(requiredNodes); | |
| for (ClusterNode node : nodes) { | |
| String nodeConsistentId = node.consistentId().toString(); | |
| missingNodes.remove(nodeConsistentId); | |
| if (missingNodes.isEmpty()) | |
| return true; | |
| } | |
| return false; | |
| } |
Comment on lines
+52
to
+65
| @Override public boolean apply(Collection<ClusterNode> nodes) { | ||
| Set<String> missingNodes = new HashSet<>(requiredValues); | ||
|
|
||
| for (ClusterNode node : nodes) { | ||
| String attrVal = node.attribute(attrName); | ||
|
|
||
| missingNodes.remove(attrVal); | ||
|
|
||
| if (missingNodes.isEmpty()) | ||
| break; | ||
| } | ||
|
|
||
| return missingNodes.isEmpty(); | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| @Override public boolean apply(Collection<ClusterNode> nodes) { | |
| Set<String> missingNodes = new HashSet<>(requiredValues); | |
| for (ClusterNode node : nodes) { | |
| String attrVal = node.attribute(attrName); | |
| missingNodes.remove(attrVal); | |
| if (missingNodes.isEmpty()) | |
| break; | |
| } | |
| return missingNodes.isEmpty(); | |
| } | |
| @Override public boolean apply(Collection<ClusterNode> nodes) { | |
| Set<String> missingNodes = new HashSet<>(requiredValues); | |
| for (ClusterNode node : nodes) { | |
| String attrVal = node.attribute(attrName); | |
| missingNodes.remove(attrVal); | |
| if (missingNodes.isEmpty()) | |
| return true; | |
| } | |
| return false; | |
| } |
|
|
||
| /** {@inheritDoc} */ | ||
| @Override public void onIgniteStart() { | ||
|
|
| } | ||
|
|
||
| /** @return IgniteConfiguration from XML. */ | ||
| private IgniteConfiguration getConfigurationFromXml(String xmlPath) throws Exception { |
Contributor
There was a problem hiding this comment.
From IDEA: Exception 'java.lang.Exception' is never thrown in the method
| PluginProvider<?> autoActivationProvider = new AutoActivationPluginProvider( | ||
| new ActivateByConsistentID(Set.of(NODE_0, NODE_1)) | ||
| ); | ||
|
|
| PluginProvider<?> autoActivationProvider = new AutoActivationPluginProvider( | ||
| new ActivateByConsistentID(Set.of(NODE_2)) | ||
| ); | ||
|
|
| PluginProvider<?> autoActivationProvider = new AutoActivationPluginProvider( | ||
| new ActivateByConsistentID(Set.of(NODE_2)) | ||
| ); | ||
|
|
Contributor
There was a problem hiding this comment.
same for other methods: remove empty lines as first lines in method bodies
Comment on lines
+139
to
+140
| private CacheConfiguration getCacheConfiguration() { | ||
| return new CacheConfiguration<>() |
Contributor
There was a problem hiding this comment.
Suggested change
| private CacheConfiguration getCacheConfiguration() { | |
| return new CacheConfiguration<>() | |
| private CacheConfiguration<String, Integer> getCacheConfiguration() { | |
| return new CacheConfiguration<String, Integer>() |
Contributor
There was a problem hiding this comment.
let's avoid raw usage of type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.