Skip to content

Commit d030a60

Browse files
committed
Reverse disordered-version warning message
The comment in `TransportHandshaker` indicates (correctly) that we emit a warning when talking to a chronologically-newer-yet-numerically-older version, but the wording of the warning message is inverted and says that the remote is chronologically-older-yet-numerically-newer. This commit straightens out the message to match the situation it is describing. Relates elastic#123397
1 parent da6029f commit d030a60

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ private static TransportVersion ensureCompatibleVersion(
241241
logger.warn(
242242
"""
243243
Negotiating transport handshake with remote node with version [{}/{}] received on [{}] which appears to be \
244-
from a chronologically-older release with a numerically-newer version compared to this node's version [{}/{}]. \
245-
Upgrading to a chronologically-older release may not work reliably and is not recommended. \
244+
from a chronologically-newer release with a numerically-older version compared to this node's version [{}/{}]. \
245+
Upgrading to this version from a chronologically-newer release may not work reliably and is not recommended. \
246246
Falling back to transport protocol version [{}].""",
247247
releaseVersion,
248248
remoteTransportVersion,

server/src/test/java/org/elasticsearch/transport/TransportHandshakerTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ public void testIncompatibleHandshakeRequest() throws Exception {
134134
Strings.format(
135135
"""
136136
Negotiating transport handshake with remote node with version [%s/%s] received on [*] which appears to be from \
137-
a chronologically-older release with a numerically-newer version compared to this node's version [%s/%s]. \
138-
Upgrading to a chronologically-older release may not work reliably and is not recommended. Falling back to \
139-
transport protocol version [%s].""",
137+
a chronologically-newer release with a numerically-older version compared to this node's version [%s/%s]. \
138+
Upgrading to this version from a chronologically-newer release may not work reliably and is not recommended. \
139+
Falling back to transport protocol version [%s].""",
140140
handshakeRequest.releaseVersion,
141141
handshakeRequest.transportVersion,
142142
Build.current().version(),
@@ -216,9 +216,9 @@ public void testHandshakeResponseFromOlderNodeWithPatchedProtocol() throws Excep
216216
Strings.format(
217217
"""
218218
Negotiating transport handshake with remote node with version [%s/%s] received on [*] which appears to be from \
219-
a chronologically-older release with a numerically-newer version compared to this node's version [%s/%s]. \
220-
Upgrading to a chronologically-older release may not work reliably and is not recommended. Falling back to \
221-
transport protocol version [%s].""",
219+
a chronologically-newer release with a numerically-older version compared to this node's version [%s/%s]. \
220+
Upgrading to this version from a chronologically-newer release may not work reliably and is not recommended. \
221+
Falling back to transport protocol version [%s].""",
222222
handshakeResponse.getReleaseVersion(),
223223
handshakeResponse.getTransportVersion(),
224224
Build.current().version(),

0 commit comments

Comments
 (0)