Skip to content

Commit

Permalink
Fixing transport deserialization with oss distribution (#218)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarat Vemulapalli <vemsarat@amazon.com>
  • Loading branch information
saratvemulapalli authored Mar 5, 2021
1 parent 8efc8e0 commit 8ed6084
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/src/main/java/org/elasticsearch/Build.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ public static Build readBuild(StreamInput in) throws IOException {
final Type type;
// The following block is kept for existing BWS tests to pass.
// TODO - clean up this code when we remove all v6 bwc tests.
if (in.getVersion().onOrAfter(Version.V_6_3_0) && in.getVersion().onOrBefore(Version.V_7_0_0)) {
// TODO - clean this up when OSS flavor is removed in all of the code base
// (Integ test zip still write OSS as distribution)
// See issue: https://github.com/opendistro-for-elasticsearch/search/issues/159
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
flavor = in.readString();
}
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
Expand All @@ -211,7 +214,9 @@ public static Build readBuild(StreamInput in) throws IOException {
public static void writeBuild(Build build, StreamOutput out) throws IOException {
// The following block is kept for existing BWS tests to pass.
// TODO - clean up this code when we remove all v6 bwc tests.
if (out.getVersion().onOrAfter(Version.V_6_3_0) && out.getVersion().onOrBefore(Version.V_7_0_0)) {
// TODO - clean this up when OSS flavor is removed in all of the code base
// See issue: https://github.com/opendistro-for-elasticsearch/search/issues/159
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
out.writeString("oss");
}
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
Expand Down

0 comments on commit 8ed6084

Please sign in to comment.