Skip to content

Commit

Permalink
correcting shard routing version (opensearch-project#15554)
Browse files Browse the repository at this point in the history
Signed-off-by: Bharathwaj G <[email protected]>
  • Loading branch information
bharath-techie authored and dk2k committed Oct 21, 2024
1 parent 122d725 commit 926e4b4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public ShardRouting(ShardId shardId, StreamInput in) throws IOException {
currentNodeId = in.readOptionalString();
relocatingNodeId = in.readOptionalString();
primary = in.readBoolean();
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
searchOnly = in.readBoolean();
} else {
searchOnly = false;
Expand Down Expand Up @@ -396,7 +396,7 @@ public void writeToThin(StreamOutput out) throws IOException {
out.writeOptionalString(currentNodeId);
out.writeOptionalString(relocatingNodeId);
out.writeBoolean(primary);
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
out.writeBoolean(searchOnly);
}
out.writeByte(state.value());
Expand Down

0 comments on commit 926e4b4

Please sign in to comment.