Reverse disordered-version warning message (#129904)

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
This commit is contained in:
David Turner 2025-06-24 18:30:11 +01:00 committed by GitHub
parent 876c456ac1
commit ba103f1c24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 8 deletions

View file

@ -241,8 +241,8 @@ final class TransportHandshaker {
logger.warn(
"""
Negotiating transport handshake with remote node with version [{}/{}] received on [{}] which appears to be \
from a chronologically-older release with a numerically-newer version compared to this node's version [{}/{}]. \
Upgrading to a chronologically-older release may not work reliably and is not recommended. \
from a chronologically-newer release with a numerically-older version compared to this node's version [{}/{}]. \
Upgrading to this version from a chronologically-newer release may not work reliably and is not recommended. \
Falling back to transport protocol version [{}].""",
releaseVersion,
remoteTransportVersion,

View file

@ -134,9 +134,9 @@ public class TransportHandshakerTests extends ESTestCase {
Strings.format(
"""
Negotiating transport handshake with remote node with version [%s/%s] received on [*] which appears to be from \
a chronologically-older release with a numerically-newer version compared to this node's version [%s/%s]. \
Upgrading to a chronologically-older release may not work reliably and is not recommended. Falling back to \
transport protocol version [%s].""",
a chronologically-newer release with a numerically-older version compared to this node's version [%s/%s]. \
Upgrading to this version from a chronologically-newer release may not work reliably and is not recommended. \
Falling back to transport protocol version [%s].""",
handshakeRequest.releaseVersion,
handshakeRequest.transportVersion,
Build.current().version(),
@ -216,9 +216,9 @@ public class TransportHandshakerTests extends ESTestCase {
Strings.format(
"""
Negotiating transport handshake with remote node with version [%s/%s] received on [*] which appears to be from \
a chronologically-older release with a numerically-newer version compared to this node's version [%s/%s]. \
Upgrading to a chronologically-older release may not work reliably and is not recommended. Falling back to \
transport protocol version [%s].""",
a chronologically-newer release with a numerically-older version compared to this node's version [%s/%s]. \
Upgrading to this version from a chronologically-newer release may not work reliably and is not recommended. \
Falling back to transport protocol version [%s].""",
handshakeResponse.getReleaseVersion(),
handshakeResponse.getTransportVersion(),
Build.current().version(),