Skip to content

Commit

Permalink
Update version after backporting elastic#83262 (elastic#83355)
Browse files Browse the repository at this point in the history
Update wire format version after backporting elastic#83262
  • Loading branch information
salvatore-campagna authored Feb 1, 2022
1 parent 742cc60 commit 584fe6e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ tasks.register("verifyVersions") {
* after the backport of the backcompat code is complete.
*/

boolean bwc_tests_enabled = false
boolean bwc_tests_enabled = true
// place a PR link here when committing bwc changes:
String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/83262"
String bwc_tests_disabled_issue = ""
/*
* FIPS 140-2 behavior was fixed in 7.11.0. Before that there is no way to run elasticsearch in a
* JVM that is properly configured to be in fips mode with BCFIPS. For now we need to disable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ setup:
---
"Float range":
- skip:
version: " - 8.1.0"
reason: Bug fixed in 8.1.0
version: " - 7.16.99"
reason: Bug fixed in 8.1.0 and backported to 7.17.0
- do:
search:
index: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private static String generateKey(BytesRef from, BytesRef to, DocValueFormat for
}

private static Bucket createFromStream(StreamInput in, DocValueFormat format, boolean keyed) throws IOException {
String key = in.getVersion().onOrAfter(Version.V_8_1_0) ? in.readOptionalString() : in.readString();
String key = in.getVersion().onOrAfter(Version.V_7_17_0) ? in.readOptionalString() : in.readString();
BytesRef from = in.readBoolean() ? in.readBytesRef() : null;
BytesRef to = in.readBoolean() ? in.readBytesRef() : null;
long docCount = in.readLong();
Expand All @@ -81,7 +81,7 @@ private static Bucket createFromStream(StreamInput in, DocValueFormat format, bo

@Override
public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_8_1_0)) {
if (out.getVersion().onOrAfter(Version.V_7_17_0)) {
out.writeOptionalString(key);
} else {
out.writeString(key == null ? generateKey(from, to, format) : key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private static String generateKey(double from, double to, DocValueFormat format)

@Override
public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_8_1_0)) {
if (out.getVersion().onOrAfter(Version.V_7_17_0)) {
out.writeOptionalString(key);
} else {
out.writeString(key == null ? generateKey(from, to, format) : key);
Expand Down Expand Up @@ -263,7 +263,7 @@ public InternalRange(StreamInput in) throws IOException {
int size = in.readVInt();
List<B> ranges = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
String key = in.getVersion().onOrAfter(Version.V_8_1_0) ? in.readOptionalString() : in.readString();
String key = in.getVersion().onOrAfter(Version.V_7_17_0) ? in.readOptionalString() : in.readString();
double from = in.readDouble();
if (in.getVersion().onOrAfter(Version.V_7_17_0)) {
in.readOptionalDouble();
Expand Down

0 comments on commit 584fe6e

Please sign in to comment.