Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public CreateIndexRequest(StreamInput in) throws IOException {
aliases.add(new Alias(in));
}
waitForActiveShards = ActiveShardCount.readFrom(in);
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
context = in.readOptionalWriteable(Context::new);
}
}
Expand Down Expand Up @@ -632,7 +632,7 @@ public void writeTo(StreamOutput out) throws IOException {
alias.writeTo(out);
}
waitForActiveShards.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
out.writeOptionalWriteable(context);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public GetIndexResponse(
}
dataStreams = Collections.unmodifiableMap(dataStreamsMapBuilder);

if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
final Map<String, Context> contextMapBuilder = new HashMap<>();
int contextSize = in.readVInt();
for (int i = 0; i < contextSize; i++) {
Expand Down Expand Up @@ -297,7 +297,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalString(indexEntry.getValue());
}

if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
out.writeVInt(contexts.size());
for (final Map.Entry<String, Context> indexEntry : contexts.entrySet()) {
out.writeString(indexEntry.getKey());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ private static class IndexMetadataDiff implements Diff<IndexMetadata> {
);
rolloverInfos = DiffableUtils.readJdkMapDiff(in, DiffableUtils.getStringKeySerializer(), ROLLOVER_INFO_DIFF_VALUE_READER);
isSystem = in.readBoolean();
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
context = in.readOptionalWriteable(Context::new);
} else {
context = null;
Expand All @@ -1153,7 +1153,7 @@ public void writeTo(StreamOutput out) throws IOException {
inSyncAllocationIds.writeTo(out);
rolloverInfos.writeTo(out);
out.writeBoolean(isSystem);
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
out.writeOptionalWriteable(context);
}
}
Expand Down Expand Up @@ -1218,7 +1218,7 @@ public static IndexMetadata readFrom(StreamInput in) throws IOException {
}
builder.system(in.readBoolean());

if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
builder.context(in.readOptionalWriteable(Context::new));
}
return builder.build();
Expand Down Expand Up @@ -1259,7 +1259,7 @@ public void writeTo(StreamOutput out) throws IOException {
}
out.writeBoolean(isSystem);

if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
out.writeOptionalWriteable(context);
}
}
Expand Down