diff --git a/server/src/main/java/org/opensearch/action/main/MainResponse.java b/server/src/main/java/org/opensearch/action/main/MainResponse.java index d3a54dec605..3b32bdea291 100644 --- a/server/src/main/java/org/opensearch/action/main/MainResponse.java +++ b/server/src/main/java/org/opensearch/action/main/MainResponse.java @@ -102,7 +102,11 @@ public class MainResponse extends ActionResponse implements ToXContentObject { @Override public void writeTo(StreamOutput out) throws IOException { out.writeString(nodeName); - Version.writeVersion(version, out); + if (out.getVersion().before(Version.V_1_0_0)) { + Version.writeVersion(LegacyESVersion.V_7_10_2, out); + } else { + Version.writeVersion(version, out); + } clusterName.writeTo(out); out.writeString(clusterUuid); Build.writeBuild(build, out);