use of com.hazelcast.internal.cluster.impl.VersionMismatchException in project hazelcast by hazelcast.
the class DefaultNodeExtension method validateJoinRequest.
@Override
public void validateJoinRequest(JoinMessage joinMessage) {
// check joining member's major.minor version is same as current cluster version's major.minor numbers
MemberVersion memberVersion = joinMessage.getMemberVersion();
Version clusterVersion = node.getClusterService().getClusterVersion();
if (!memberVersion.asVersion().equals(clusterVersion)) {
String msg = "Joining node's version " + memberVersion + " is not compatible with cluster version " + clusterVersion;
if (clusterVersion.getMajor() != memberVersion.getMajor()) {
msg += " (Rolling Member Upgrades are only supported for the same major version)";
}
if (clusterVersion.getMinor() > memberVersion.getMinor()) {
msg += " (Rolling Member Upgrades are only supported for the next minor version)";
}
if (!BuildInfoProvider.getBuildInfo().isEnterprise()) {
msg += " (Rolling Member Upgrades are only supported in Hazelcast Enterprise)";
}
throw new VersionMismatchException(msg);
}
}
Aggregations