lower rollover-info version bound to 6.4 (#31414)
This feature is supported in 6.4, this commit reflects that
This commit is contained in:
parent
4f850273b3
commit
8bfb9aadd9
|
@ -693,7 +693,7 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContentFragmen
|
||||||
});
|
});
|
||||||
inSyncAllocationIds = DiffableUtils.readImmutableOpenIntMapDiff(in, DiffableUtils.getVIntKeySerializer(),
|
inSyncAllocationIds = DiffableUtils.readImmutableOpenIntMapDiff(in, DiffableUtils.getVIntKeySerializer(),
|
||||||
DiffableUtils.StringSetValueSerializer.getInstance());
|
DiffableUtils.StringSetValueSerializer.getInstance());
|
||||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||||
rolloverInfos = DiffableUtils.readImmutableOpenMapDiff(in, DiffableUtils.getStringKeySerializer(), RolloverInfo::new,
|
rolloverInfos = DiffableUtils.readImmutableOpenMapDiff(in, DiffableUtils.getStringKeySerializer(), RolloverInfo::new,
|
||||||
RolloverInfo::readDiffFrom);
|
RolloverInfo::readDiffFrom);
|
||||||
} else {
|
} else {
|
||||||
|
@ -714,7 +714,7 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContentFragmen
|
||||||
aliases.writeTo(out);
|
aliases.writeTo(out);
|
||||||
customs.writeTo(out);
|
customs.writeTo(out);
|
||||||
inSyncAllocationIds.writeTo(out);
|
inSyncAllocationIds.writeTo(out);
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||||
rolloverInfos.writeTo(out);
|
rolloverInfos.writeTo(out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -765,7 +765,7 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContentFragmen
|
||||||
Set<String> allocationIds = DiffableUtils.StringSetValueSerializer.getInstance().read(in, key);
|
Set<String> allocationIds = DiffableUtils.StringSetValueSerializer.getInstance().read(in, key);
|
||||||
builder.putInSyncAllocationIds(key, allocationIds);
|
builder.putInSyncAllocationIds(key, allocationIds);
|
||||||
}
|
}
|
||||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||||
int rolloverAliasesSize = in.readVInt();
|
int rolloverAliasesSize = in.readVInt();
|
||||||
for (int i = 0; i < rolloverAliasesSize; i++) {
|
for (int i = 0; i < rolloverAliasesSize; i++) {
|
||||||
builder.putRolloverInfo(new RolloverInfo(in));
|
builder.putRolloverInfo(new RolloverInfo(in));
|
||||||
|
@ -800,7 +800,7 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContentFragmen
|
||||||
out.writeVInt(cursor.key);
|
out.writeVInt(cursor.key);
|
||||||
DiffableUtils.StringSetValueSerializer.getInstance().write(cursor.value, out);
|
DiffableUtils.StringSetValueSerializer.getInstance().write(cursor.value, out);
|
||||||
}
|
}
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||||
out.writeVInt(rolloverInfos.size());
|
out.writeVInt(rolloverInfos.size());
|
||||||
for (ObjectCursor<RolloverInfo> cursor : rolloverInfos.values()) {
|
for (ObjectCursor<RolloverInfo> cursor : rolloverInfos.values()) {
|
||||||
cursor.value.writeTo(out);
|
cursor.value.writeTo(out);
|
||||||
|
|
Loading…
Reference in New Issue