Skip to content

Commit

Permalink
Adjust the serialization version for flattened field telemetry.
Browse files Browse the repository at this point in the history
Follow-up to #48972, which was also backported to 7.6.
  • Loading branch information
jtibshirani committed Nov 18, 2019
1 parent d82fafd commit ab66c48
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class FlattenedFeatureSetUsage extends XPackFeatureSet.Usage {

public FlattenedFeatureSetUsage(StreamInput input) throws IOException {
super(input);
this.fieldCount = input.getVersion().onOrAfter(Version.V_8_0_0) ? input.readInt() : 0;
this.fieldCount = input.getVersion().onOrAfter(Version.V_7_6_0) ? input.readInt() : 0;
}

public FlattenedFeatureSetUsage(boolean available, boolean enabled, int fieldCount) {
Expand All @@ -36,7 +36,7 @@ int fieldCount() {
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_6_0)) {
out.writeInt(fieldCount);
}
}
Expand Down

0 comments on commit ab66c48

Please sign in to comment.