Skip to content

Commit 42403b9

Browse files
bcullydakrone
andauthored
Fix serialization of StreamsMetadata (elastic#142171) (elastic#142177)
Accidentally introduced in elastic#141564 during a refactor, this fixes the serialization issue for older versions. Co-authored-by: Lee Hinman <dakrone@users.noreply.github.com>
1 parent ffe8db0 commit 42403b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server/src/main/java/org/elasticsearch/cluster/metadata/StreamsMetadata.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ public static NamedDiff<Metadata.ProjectCustom> readDiffFrom(StreamInput in) thr
120120
@Override
121121
public void writeTo(StreamOutput out) throws IOException {
122122
out.writeBoolean(logsEnabled);
123-
out.writeBoolean(logsECSEnabled);
124-
out.writeBoolean(logsOTelEnabled);
123+
if (out.getTransportVersion().supports(STREAM_SPLIT_VERSION)) {
124+
out.writeBoolean(logsECSEnabled);
125+
out.writeBoolean(logsOTelEnabled);
126+
}
125127
}
126128

127129
@Override

0 commit comments

Comments
 (0)