Skip to content

Commit

Permalink
change v3 to local static
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Walter Knize <[email protected]>
  • Loading branch information
nknize committed Jan 14, 2022
1 parent f709bfb commit 0830a2c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ final class TransportHandshaker {
private final ThreadPool threadPool;
private final HandshakeRequestSender handshakeRequestSender;

// @todo remove in 3.0.0
private static final Version V_3_0_0 = Version.fromId(3000099 ^ Version.MASK);

TransportHandshaker(Version version, ThreadPool threadPool, HandshakeRequestSender handshakeRequestSender) {
this.version = version;
this.threadPool = threadPool;
Expand Down Expand Up @@ -131,7 +134,7 @@ void handleHandshake(TransportChannel channel, long requestId, StreamInput strea
// 1. if remote node is 7.x, then StreamInput version would be 6.8.0
// 2. if remote node is 6.8 then it would be 5.6.0
// 3. if remote node is OpenSearch 1.x then it would be 6.7.99
if ((this.version.onOrAfter(Version.V_1_0_0) && this.version.before(Version.fromId(3000099 ^ Version.MASK)))
if ((this.version.onOrAfter(Version.V_1_0_0) && this.version.before(V_3_0_0))
&& (stream.getVersion().equals(LegacyESVersion.fromId(6080099)) || stream.getVersion().equals(Version.fromId(5060099)))) {
// send 7.10.2 in response to ensure compatibility w/ Legacy 7.10.x nodes for rolling upgrade support
channel.sendResponse(new HandshakeResponse(LegacyESVersion.V_7_10_2));
Expand Down

0 comments on commit 0830a2c

Please sign in to comment.