Skip to content

Commit

Permalink
#26496: Set the correct bwc version after backport to 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczi committed Sep 11, 2017
1 parent 1adee8b commit c62b019
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,15 @@ public CompletionSuggestion(String name, int size, boolean skipDuplicates) {
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
// TODO should be backported to 6.1.0
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
skipDuplicates = in.readBoolean();
}
}

@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
// TODO should be backported to 6.1.0
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
out.writeBoolean(skipDuplicates);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ public CompletionSuggestionBuilder(StreamInput in) throws IOException {
fuzzyOptions = in.readOptionalWriteable(FuzzyOptions::new);
regexOptions = in.readOptionalWriteable(RegexOptions::new);
contextBytes = in.readOptionalBytesReference();
// TODO should be backported to 6.1.0
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
skipDuplicates = in.readBoolean();
}
}
Expand All @@ -139,8 +138,7 @@ public void doWriteTo(StreamOutput out) throws IOException {
out.writeOptionalWriteable(fuzzyOptions);
out.writeOptionalWriteable(regexOptions);
out.writeOptionalBytesReference(contextBytes);
// TODO should be backported to 6.1.0
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
out.writeBoolean(skipDuplicates);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ setup:
---
"Skip duplicates should work":
- skip:
version: " - 6.99.99"
reason: skip_duplicates was added in 7.0 (TODO should be backported to 6.1)
version: " - 6.0.99"
reason: skip_duplicates was added in 6.1

- do:
index:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ setup:
---
"Skip duplicates with contexts should work":
- skip:
version: " - 6.99.99"
reason: skip_duplicates was added in 7.0 (TODO should be backported to 6.1)
version: " - 6.0.99"
reason: skip_duplicates was added in 6.1

- do:
index:
Expand Down

0 comments on commit c62b019

Please sign in to comment.