diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java index c1cd2ec3fbe..b4a7733c62e 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java @@ -641,7 +641,7 @@ public class IndexMetaData implements Diffable, ToXContentFragmen } else { mappingVersion = 1; } - if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (in.getVersion().onOrAfter(Version.V_6_5_0)) { settingsVersion = in.readVLong(); } else { settingsVersion = 1; @@ -674,7 +674,7 @@ public class IndexMetaData implements Diffable, ToXContentFragmen if (out.getVersion().onOrAfter(Version.V_6_5_0)) { out.writeVLong(mappingVersion); } - if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (out.getVersion().onOrAfter(Version.V_6_5_0)) { out.writeVLong(settingsVersion); } out.writeByte(state.id); @@ -716,7 +716,7 @@ public class IndexMetaData implements Diffable, ToXContentFragmen } else { builder.mappingVersion(1); } - if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (in.getVersion().onOrAfter(Version.V_6_5_0)) { builder.settingsVersion(in.readVLong()); } else { builder.settingsVersion(1); @@ -770,7 +770,7 @@ public class IndexMetaData implements Diffable, ToXContentFragmen if (out.getVersion().onOrAfter(Version.V_6_5_0)) { out.writeVLong(mappingVersion); } - if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (out.getVersion().onOrAfter(Version.V_6_5_0)) { out.writeVLong(settingsVersion); } out.writeInt(routingNumShards); @@ -1355,8 +1355,8 @@ public class IndexMetaData implements Diffable, ToXContentFragmen if (Assertions.ENABLED && Version.indexCreated(builder.settings).onOrAfter(Version.V_6_5_0)) { assert mappingVersion : "mapping version should be present for indices created on or after 6.5.0"; } - if (Assertions.ENABLED && Version.indexCreated(builder.settings).onOrAfter(Version.V_7_0_0_alpha1)) { - assert settingsVersion : "settings version should be present for indices created on or after 7.0.0"; + if (Assertions.ENABLED && Version.indexCreated(builder.settings).onOrAfter(Version.V_6_5_0)) { + assert settingsVersion : "settings version should be present for indices created on or after 6.5.0"; } return builder.build(); } diff --git a/server/src/main/java/org/elasticsearch/index/IndexService.java b/server/src/main/java/org/elasticsearch/index/IndexService.java index b1ff7be32c3..e4fd949d88e 100644 --- a/server/src/main/java/org/elasticsearch/index/IndexService.java +++ b/server/src/main/java/org/elasticsearch/index/IndexService.java @@ -626,7 +626,7 @@ public class IndexService extends AbstractIndexComponent implements IndicesClust if (Assertions.ENABLED && currentIndexMetaData != null - && currentIndexMetaData.getCreationVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + && currentIndexMetaData.getCreationVersion().onOrAfter(Version.V_6_5_0)) { final long currentSettingsVersion = currentIndexMetaData.getSettingsVersion(); final long newSettingsVersion = newIndexMetaData.getSettingsVersion(); if (currentSettingsVersion == newSettingsVersion) {