Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -685,21 +685,21 @@ public HandshakeResponse(StreamInput in) throws IOException {
// message, but recognise that this may fail
discoveryNode = new DiscoveryNode(in);
} catch (Exception e) {
maybeThrowOnIncompatibleBuild(null, e);
maybeWarnOnIncompatibleBuild(null, e);
throw e;
}
maybeThrowOnIncompatibleBuild(discoveryNode, null);
maybeWarnOnIncompatibleBuild(discoveryNode, null);
clusterName = new ClusterName(in);
}

private void maybeThrowOnIncompatibleBuild(@Nullable DiscoveryNode node, @Nullable Exception e) {
private void maybeWarnOnIncompatibleBuild(@Nullable DiscoveryNode node, @Nullable Exception e) {
if (SERVERLESS_TRANSPORT_FEATURE_FLAG == false && isIncompatibleBuild(version, buildHash)) {
throwOnIncompatibleBuild(node, e);
warnOnIncompatibleBuild(node, e);
}
}

private void throwOnIncompatibleBuild(@Nullable DiscoveryNode node, @Nullable Exception e) {
throw new IllegalArgumentException(
private void warnOnIncompatibleBuild(@Nullable DiscoveryNode node, @Nullable Exception e) {
logger.warn(
"remote node ["
+ (node == null ? "unidentifiable" : node)
+ "] is build ["
Expand Down