Skip to content

Commit

Permalink
change version serialization check to 6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
talevy committed Jun 19, 2018
1 parent a5d68d1 commit 64be08e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ public Diff<Custom> readDiff(StreamInput in, String key) throws IOException {
});
inSyncAllocationIds = DiffableUtils.readImmutableOpenIntMapDiff(in, DiffableUtils.getVIntKeySerializer(),
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,
RolloverInfo::readDiffFrom);
} else {
Expand All @@ -715,7 +715,7 @@ public void writeTo(StreamOutput out) throws IOException {
aliases.writeTo(out);
customs.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);
}
}
Expand Down Expand Up @@ -766,7 +766,7 @@ public static IndexMetaData readFrom(StreamInput in) throws IOException {
Set<String> allocationIds = DiffableUtils.StringSetValueSerializer.getInstance().read(in, key);
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();
for (int i = 0; i < rolloverAliasesSize; i++) {
builder.putRolloverInfo(new RolloverInfo(in));
Expand Down Expand Up @@ -801,7 +801,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(cursor.key);
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());
for (ObjectCursor<RolloverInfo> cursor : rolloverInfos.values()) {
cursor.value.writeTo(out);
Expand Down

0 comments on commit 64be08e

Please sign in to comment.