Skip to content

Commit f5f3324

Browse files
authored
Reverse disordered-version warning message (#129956) (#129960)
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 #123397 Backport of #129904 to `8.19`
1 parent 2df9daa commit f5f3324

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

docs/changelog/129904.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129904
2+
summary: Reverse disordered-version warning message
3+
area: Infra/Core
4+
type: bug
5+
issues: []

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ private static TransportVersion ensureCompatibleVersion(
301301
logger.warn(
302302
"""
303303
Negotiating transport handshake with remote node with version [{}/{}] received on [{}] which appears to be \
304-
from a chronologically-older release with a numerically-newer version compared to this node's version [{}/{}]. \
305-
Upgrading to a chronologically-older release may not work reliably and is not recommended. \
304+
from a chronologically-newer release with a numerically-older version compared to this node's version [{}/{}]. \
305+
Upgrading to this version from a chronologically-newer release may not work reliably and is not recommended. \
306306
Falling back to transport protocol version [{}].""",
307307
remoteReleaseVersion,
308308
remoteTransportVersion,

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ public void testIncompatibleHandshakeRequest() throws Exception {
133133
Strings.format(
134134
"""
135135
Negotiating transport handshake with remote node with version [%s/%s] received on [*] which appears to be from \
136-
a chronologically-older release with a numerically-newer version compared to this node's version [%s/%s]. \
137-
Upgrading to a chronologically-older release may not work reliably and is not recommended. Falling back to \
138-
transport protocol version [%s].""",
136+
a chronologically-newer release with a numerically-older version compared to this node's version [%s/%s]. \
137+
Upgrading to this version from a chronologically-newer release may not work reliably and is not recommended. \
138+
Falling back to transport protocol version [%s].""",
139139
handshakeRequest.transportVersion.toReleaseVersion(),
140140
handshakeRequest.transportVersion,
141141
Build.current().version(),
@@ -222,9 +222,9 @@ public void testHandshakeResponseFromOlderNodeWithPatchedProtocol() throws Excep
222222
Strings.format(
223223
"""
224224
Negotiating transport handshake with remote node with version [%s/%s] received on [*] which appears to be from \
225-
a chronologically-older release with a numerically-newer version compared to this node's version [%s/%s]. \
226-
Upgrading to a chronologically-older release may not work reliably and is not recommended. Falling back to \
227-
transport protocol version [%s].""",
225+
a chronologically-newer release with a numerically-older version compared to this node's version [%s/%s]. \
226+
Upgrading to this version from a chronologically-newer release may not work reliably and is not recommended. \
227+
Falling back to transport protocol version [%s].""",
228228
handshakeResponse.getReleaseVersion(),
229229
handshakeResponse.getTransportVersion(),
230230
Build.current().version(),

0 commit comments

Comments
 (0)