From d368e3bfd9a96494fb3699af2bea4b2e5cde108c Mon Sep 17 00:00:00 2001 From: Lakshya Taragi <157457166+ltaragi@users.noreply.github.com> Date: Wed, 4 Sep 2024 14:42:12 +0530 Subject: [PATCH] Change version to V_2_17_0 (#15596) (#15642) Signed-off-by: Lakshya Taragi (cherry picked from commit 0f53bf9762f758505a814543ac93c5aaa7bf8e74) --- .../main/java/org/opensearch/OpenSearchServerException.java | 3 +-- .../cluster/snapshots/status/SnapshotsStatusRequest.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/org/opensearch/OpenSearchServerException.java b/server/src/main/java/org/opensearch/OpenSearchServerException.java index a1c18b8a66e6f..5fb064f2c9182 100644 --- a/server/src/main/java/org/opensearch/OpenSearchServerException.java +++ b/server/src/main/java/org/opensearch/OpenSearchServerException.java @@ -13,7 +13,6 @@ import static org.opensearch.OpenSearchException.OpenSearchExceptionHandle; import static org.opensearch.OpenSearchException.OpenSearchExceptionHandleRegistry.registerExceptionHandle; import static org.opensearch.OpenSearchException.UNKNOWN_VERSION_ADDED; -import static org.opensearch.Version.CURRENT; import static org.opensearch.Version.V_2_10_0; import static org.opensearch.Version.V_2_17_0; import static org.opensearch.Version.V_2_1_0; @@ -1194,7 +1193,7 @@ public static void registerExceptions() { org.opensearch.snapshots.TooManyShardsInSnapshotsStatusException.class, org.opensearch.snapshots.TooManyShardsInSnapshotsStatusException::new, 175, - CURRENT + V_2_17_0 ) ); registerExceptionHandle( diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java index 5dbd48e23f7ef..3d7fb5b6beb56 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java @@ -90,7 +90,7 @@ public SnapshotsStatusRequest(StreamInput in) throws IOException { repository = in.readString(); snapshots = in.readStringArray(); ignoreUnavailable = in.readBoolean(); - if (in.getVersion().onOrAfter(Version.CURRENT)) { + if (in.getVersion().onOrAfter(Version.V_2_17_0)) { indices = in.readOptionalStringArray(); } } @@ -101,7 +101,7 @@ public void writeTo(StreamOutput out) throws IOException { out.writeString(repository); out.writeStringArray(snapshots); out.writeBoolean(ignoreUnavailable); - if (out.getVersion().onOrAfter(Version.CURRENT)) { + if (out.getVersion().onOrAfter(Version.V_2_17_0)) { out.writeOptionalStringArray(indices); } }