From 84679dea01cdae9d50bd9cd6b8c39062df958d40 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Wed, 17 Apr 2024 14:12:14 -0400 Subject: [PATCH] Snapshot _status API to return correct status for partial snapshots (update version) (#13262) Signed-off-by: Andriy Redko --- .../main/java/org/opensearch/cluster/SnapshotsInProgress.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java b/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java index 8dbdcaa541734..d658f38430dd9 100644 --- a/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java +++ b/server/src/main/java/org/opensearch/cluster/SnapshotsInProgress.java @@ -747,7 +747,7 @@ public void writeTo(StreamOutput out) throws IOException { snapshot.writeTo(out); out.writeBoolean(includeGlobalState); out.writeBoolean(partial); - if ((out.getVersion().before(Version.V_3_0_0)) && state == State.PARTIAL) { + if ((out.getVersion().before(Version.V_2_14_0)) && state == State.PARTIAL) { // Setting to SUCCESS for partial snapshots in older versions to maintain backward compatibility out.writeByte(State.SUCCESS.value()); } else {