petrov-mg commented on code in PR #13456:
URL: https://github.com/apache/ignite/pull/13456#discussion_r3747970217
##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java:
##########
@@ -1686,6 +1694,40 @@ Socket createSocket() throws IOException {
}
}
+ /** */
+ IgniteNodeFeatureSet localNodeFeatures() {
+ return locNodeFeatures;
+ }
+
+ /** */
+ void validateRemoteFeatures(IgniteNodeFeatureSet rmtFeatures) throws
IgniteCheckedException {
+ if (rmtFeatures == null)
+ throw new UnsupportedNodeVersionException("Remote node component
versions are not supported" +
+ " [locComponents=" + locNodeFeatures +
+ ", rmtComponents=" + rmtFeatures + ']');
+
+ for (IgniteComponentFeatureSet rmtCmpFeatures : rmtFeatures.values()) {
+ IgniteComponentFeatureSet locCmpFeatures =
locNodeFeatures.componentFeatures(rmtCmpFeatures.componentName());
+
+ if (locCmpFeatures == null)
+ continue;
+
+ int c =
locCmpFeatures.version().compareTo(rmtCmpFeatures.version());
+
+ if (c == 0)
+ continue;
+
+ IgniteComponentFeatureSet src = c > 0 ? rmtCmpFeatures :
locCmpFeatures;
+ IgniteComponentFeatureSet target = c > 0 ? locCmpFeatures :
rmtCmpFeatures;
+
+ if (!src.isUpgradableTo(target)) {
+ throw new UnsupportedNodeVersionException("Remote node
component versions are not supported" +
Review Comment:
Done.
--
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]