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

[Remove] Remaining Flavor Serialization #1751

Merged
merged 3 commits into from
Dec 16, 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
10 changes: 5 additions & 5 deletions server/src/main/java/org/opensearch/Build.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ public String date() {

public static Build readBuild(StreamInput in) throws IOException {
final String distribution;
final String flavor;
final Type type;
// the following is new for opensearch: we write the distribution to support any "forks"
if (in.getVersion().onOrAfter(Version.V_1_0_0)) {
Expand All @@ -215,8 +214,9 @@ public static Build readBuild(StreamInput in) throws IOException {
// 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(LegacyESVersion.V_6_3_0)) {
flavor = in.readString();
// todo change to V_1_3_0 after backporting
if (in.getVersion().onOrAfter(LegacyESVersion.V_6_3_0) && in.getVersion().before(Version.V_2_0_0)) {
String flavor = in.readString();
}
if (in.getVersion().onOrAfter(LegacyESVersion.V_6_3_0)) {
// be lenient when reading on the wire, the enumeration values from other versions might be different than what we know
Expand Down Expand Up @@ -246,8 +246,8 @@ 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.
// 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(LegacyESVersion.V_6_3_0)) {
// todo change to V_1_3_0 after backporting
if (out.getVersion().onOrAfter(LegacyESVersion.V_6_3_0) && out.getVersion().before(Version.V_2_0_0)) {
out.writeString("oss");
}
if (out.getVersion().onOrAfter(LegacyESVersion.V_6_3_0)) {
Expand Down