diff --git a/server/src/main/java/org/elasticsearch/common/Rounding.java b/server/src/main/java/org/elasticsearch/common/Rounding.java index 1805bc1a8730c..dc87feb1f4ba8 100644 --- a/server/src/main/java/org/elasticsearch/common/Rounding.java +++ b/server/src/main/java/org/elasticsearch/common/Rounding.java @@ -585,7 +585,7 @@ static class OffsetRounding extends Rounding { @Override public void innerWriteTo(StreamOutput out) throws IOException { - if (out.getVersion().onOrAfter(Version.V_7_6_0)) { + if (out.getVersion().onOrAfter(Version.V_8_0_0)) { throw new IllegalArgumentException("Offset rounding not supported before 8.0.0"); } delegate.writeTo(out); diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java index 9bf0548b2143e..d4bf25e041a02 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java @@ -91,7 +91,7 @@ protected DateHistogramValuesSourceBuilder(StreamInput in) throws IOException { super(in); dateHistogramInterval = new DateIntervalWrapper(in); timeZone = in.readOptionalZoneId(); - if (in.getVersion().onOrAfter(Version.V_7_6_0)) { + if (in.getVersion().onOrAfter(Version.V_8_0_0)) { offset = in.readLong(); } } @@ -100,7 +100,7 @@ protected DateHistogramValuesSourceBuilder(StreamInput in) throws IOException { protected void innerWriteTo(StreamOutput out) throws IOException { dateHistogramInterval.writeTo(out); out.writeOptionalZoneId(timeZone); - if (out.getVersion().onOrAfter(Version.V_7_6_0)) { + if (out.getVersion().onOrAfter(Version.V_8_0_0)) { out.writeLong(offset); } }