-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[ML] removing old 7.x bwc serialization code #80029
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.elasticsearch.Version; | ||
import org.elasticsearch.common.io.stream.StreamInput; | ||
import org.elasticsearch.common.io.stream.StreamOutput; | ||
import org.elasticsearch.common.io.stream.Writeable; | ||
|
@@ -40,9 +39,6 @@ class AggProvider implements Writeable, ToXContentObject { | |
|
||
static AggProvider fromXContent(XContentParser parser, boolean lenient) throws IOException { | ||
Map<String, Object> aggs = parser.mapOrdered(); | ||
// NOTE: Always rewrite potentially old date histogram intervals. | ||
// This should occur in 8.x+ but not 7.x. | ||
// 7.x is BWC with versions that do not support the new date_histogram fields | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the changes in this file should be reverted, because 8.x needs to be able to coexist with 7.16. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, all of 8.x -> 7.16. Will revert the various places. |
||
boolean rewroteAggs = false; | ||
if (lenient) { | ||
rewroteAggs = rewriteDateHistogramInterval(aggs, false); | ||
|
@@ -117,7 +113,7 @@ static AggProvider fromStream(StreamInput in) throws IOException { | |
in.readMap(), | ||
in.readOptionalWriteable(AggregatorFactories.Builder::new), | ||
in.readException(), | ||
in.getVersion().onOrAfter(Version.V_8_0_0) ? in.readBoolean() : false | ||
in.readBoolean() | ||
); | ||
} | ||
|
||
|
@@ -140,9 +136,7 @@ public void writeTo(StreamOutput out) throws IOException { | |
out.writeMap(aggs); | ||
out.writeOptionalWriteable(parsedAggs); | ||
out.writeException(parsingException); | ||
if (out.getVersion().onOrAfter(Version.V_8_0_0)) { | ||
out.writeBoolean(rewroteAggs); | ||
} | ||
out.writeBoolean(rewroteAggs); | ||
} | ||
|
||
public Exception getParsingException() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should really have been
V_7_13_0
, so this is actually a bad bug that would mean 8.0.0-alpha1, 8.0.0-alpha2 and 8.0.0-beta1 cannot safely run in a mixed version cluster with 7.16.x if the ML metadata exists and an MlMetadata diff gets bundled up into the same cluster state update as some other update. I guess we never hit that in testing. 😬I'm wondering if we need a known issue for 8.0.0-beta1 telling people not to attempt a rolling upgrade to it if they are using ML.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at 7.16, at least its correct there 😌
IDK if we have a list of known issues or not for beta1. If we do, this should definitely be on it.