Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing transport deserialization with oss distribution #218

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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