Skip to content

Commit 766956e

Browse files
committed
Tolerate incompatible versions with different build hash
1 parent ba50798 commit 766956e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

server/src/main/java/org/elasticsearch/transport/TransportService.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -685,21 +685,21 @@ public HandshakeResponse(StreamInput in) throws IOException {
685685
// message, but recognise that this may fail
686686
discoveryNode = new DiscoveryNode(in);
687687
} catch (Exception e) {
688-
maybeThrowOnIncompatibleBuild(null, e);
688+
maybeWarnOnIncompatibleBuild(null, e);
689689
throw e;
690690
}
691-
maybeThrowOnIncompatibleBuild(discoveryNode, null);
691+
maybeWarnOnIncompatibleBuild(discoveryNode, null);
692692
clusterName = new ClusterName(in);
693693
}
694694

695-
private void maybeThrowOnIncompatibleBuild(@Nullable DiscoveryNode node, @Nullable Exception e) {
695+
private void maybeWarnOnIncompatibleBuild(@Nullable DiscoveryNode node, @Nullable Exception e) {
696696
if (SERVERLESS_TRANSPORT_FEATURE_FLAG == false && isIncompatibleBuild(version, buildHash)) {
697-
throwOnIncompatibleBuild(node, e);
697+
warnOnIncompatibleBuild(node, e);
698698
}
699699
}
700700

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

0 commit comments

Comments
 (0)