Skip to content

Commit

Permalink
Adjust data stream custom metadata serialization,
Browse files Browse the repository at this point in the history
after backporting elastic#63991 to 7. branch.
  • Loading branch information
martijnvg committed Oct 26, 2020
1 parent 309684f commit 1b7324c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public static String getDefaultBackingIndexName(String dataStreamName, long gene

public DataStream(StreamInput in) throws IOException {
this(in.readString(), new TimestampField(in), in.readList(Index::new), in.readVLong(),
in.getVersion().onOrAfter(Version.V_8_0_0) ? in.readMap(): null);
in.getVersion().onOrAfter(Version.V_7_11_0) ? in.readMap(): null);
}

public static Diff<DataStream> readDiffFrom(StreamInput in) throws IOException {
Expand All @@ -166,7 +166,7 @@ public void writeTo(StreamOutput out) throws IOException {
timeStampField.writeTo(out);
out.writeList(indices);
out.writeVLong(generation);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_11_0)) {
out.writeMap(metadata);
}
}
Expand Down

0 comments on commit 1b7324c

Please sign in to comment.