Build: Add 5.0.0-rc1 version (#20721)

This change also fixes the version name for beta1, as it was never
updated from alpha6 in master.
This commit is contained in:
Ryan Ernst 2016-10-03 09:27:34 -07:00 committed by GitHub
parent 7b5e651260
commit 80bae2178f
9 changed files with 18 additions and 16 deletions

View File

@ -85,8 +85,10 @@ public class Version {
public static final Version V_5_0_0_alpha4 = new Version(V_5_0_0_alpha4_ID, org.apache.lucene.util.Version.LUCENE_6_1_0);
public static final int V_5_0_0_alpha5_ID = 5000005;
public static final Version V_5_0_0_alpha5 = new Version(V_5_0_0_alpha5_ID, org.apache.lucene.util.Version.LUCENE_6_1_0);
public static final int V_5_0_0_alpha6_ID = 5000006;
public static final Version V_5_0_0_alpha6 = new Version(V_5_0_0_alpha6_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
public static final int V_5_0_0_beta1_ID = 5000026;
public static final Version V_5_0_0_beta1 = new Version(V_5_0_0_beta1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
public static final int V_5_0_0_rc1_ID = 5000051;
public static final Version V_5_0_0_rc1 = new Version(V_5_0_0_rc1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
public static final int V_6_0_0_alpha1_ID = 6000001;
public static final Version V_6_0_0_alpha1 = new Version(V_6_0_0_alpha1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
public static final Version CURRENT = V_6_0_0_alpha1;
@ -104,8 +106,10 @@ public class Version {
switch (id) {
case V_6_0_0_alpha1_ID:
return V_6_0_0_alpha1;
case V_5_0_0_alpha6_ID:
return V_5_0_0_alpha6;
case V_5_0_0_rc1_ID:
return V_5_0_0_rc1;
case V_5_0_0_beta1_ID:
return V_5_0_0_beta1;
case V_5_0_0_alpha5_ID:
return V_5_0_0_alpha5;
case V_5_0_0_alpha4_ID:

View File

@ -222,7 +222,7 @@ public class IndexTemplateMetaData extends AbstractDiffable<IndexTemplateMetaDat
IndexMetaData.Custom customIndexMetaData = IndexMetaData.lookupPrototypeSafe(type).readFrom(in);
builder.putCustom(type, customIndexMetaData);
}
if (in.getVersion().onOrAfter(Version.V_5_0_0_alpha6)) {
if (in.getVersion().onOrAfter(Version.V_5_0_0_beta1)) {
builder.version(in.readOptionalVInt());
}
return builder.build();
@ -248,7 +248,7 @@ public class IndexTemplateMetaData extends AbstractDiffable<IndexTemplateMetaDat
out.writeString(cursor.key);
cursor.value.writeTo(out);
}
if (out.getVersion().onOrAfter(Version.V_5_0_0_alpha6)) {
if (out.getVersion().onOrAfter(Version.V_5_0_0_beta1)) {
out.writeOptionalVInt(version);
}
}

View File

@ -30,7 +30,6 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.set.Sets;
import org.elasticsearch.env.Environment;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.mapper.TextFieldMapper;
import org.elasticsearch.indices.analysis.AnalysisModule;
@ -533,7 +532,7 @@ public final class AnalysisRegistry implements Closeable {
// TODO: remove alias support completely when we no longer support pre 5.0 indices
final String analyzerAliasKey = "index.analysis.analyzer." + analyzerFactory.name() + ".alias";
if (indexSettings.getSettings().get(analyzerAliasKey) != null) {
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_5_0_0_alpha6)) {
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_5_0_0_beta1)) {
// do not allow alias creation if the index was created on or after v5.0 alpha6
throw new IllegalArgumentException("setting [" + analyzerAliasKey + "] is not supported");
}

View File

@ -124,7 +124,7 @@ public class InternalEngine extends Engine {
public InternalEngine(EngineConfig engineConfig) throws EngineException {
super(engineConfig);
openMode = engineConfig.getOpenMode();
if (engineConfig.getIndexSettings().getIndexVersionCreated().before(Version.V_5_0_0_alpha6)) {
if (engineConfig.getIndexSettings().getIndexVersionCreated().before(Version.V_5_0_0_beta1)) {
// no optimization for pre 5.0.0.alpha6 since translog might not have all information needed
maxUnsafeAutoIdTimestamp.set(Long.MAX_VALUE);
} else {

View File

@ -246,7 +246,7 @@ public abstract class FieldMapper extends Mapper implements Cloneable {
super(simpleName);
assert indexSettings != null;
this.indexCreatedVersion = Version.indexCreated(indexSettings);
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_alpha6)) {
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_beta1)) {
if (simpleName.isEmpty()) {
throw new IllegalArgumentException("name cannot be empty string");
}

View File

@ -34,7 +34,6 @@ import org.elasticsearch.index.query.QueryShardContext;
import org.elasticsearch.index.query.QueryShardException;
import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
/**
@ -44,7 +43,7 @@ import java.util.Map;
*/
public class LatLonPointFieldMapper extends BaseGeoPointFieldMapper {
public static final String CONTENT_TYPE = "geo_point";
public static final Version LAT_LON_FIELD_VERSION = Version.V_5_0_0_alpha6;
public static final Version LAT_LON_FIELD_VERSION = Version.V_5_0_0_beta1;
public static class Defaults extends BaseGeoPointFieldMapper.Defaults {
public static final LatLonPointFieldType FIELD_TYPE = new LatLonPointFieldType();

View File

@ -325,7 +325,7 @@ public class ObjectMapper extends Mapper implements Cloneable {
super(name);
assert settings != null;
Version indexCreatedVersion = Version.indexCreated(settings);
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_alpha6)) {
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_beta1)) {
if (name.isEmpty()) {
throw new IllegalArgumentException("name cannot be empty string");
}

View File

@ -266,7 +266,7 @@ public class GeoBoundingBoxQueryBuilderTests extends AbstractQueryTestCase<GeoBo
} else {
assertTrue("Found no indexed geo query.", query instanceof LegacyInMemoryGeoBoundingBoxQuery);
}
} else if (context.indexVersionCreated().before(Version.V_5_0_0_alpha6)) {
} else if (context.indexVersionCreated().before(Version.V_5_0_0_beta1)) {
assertTrue("Found no indexed geo query.", query instanceof GeoPointInBBoxQuery);
} else {
assertTrue("Found no indexed geo query.", query instanceof Query);
@ -431,7 +431,7 @@ public class GeoBoundingBoxQueryBuilderTests extends AbstractQueryTestCase<GeoBo
assertThat(filter.topLeft().lon(), closeTo(-70, 1E-5));
assertThat(filter.bottomRight().lat(), closeTo(30, 1E-5));
assertThat(filter.bottomRight().lon(), closeTo(-80, 1E-5));
} else if (shardContext.indexVersionCreated().before(Version.V_5_0_0_alpha6)) {
} else if (shardContext.indexVersionCreated().before(Version.V_5_0_0_beta1)) {
GeoPointInBBoxQuery q = (GeoPointInBBoxQuery) parsedQuery;
assertThat(q.getField(), equalTo(GEO_POINT_FIELD_NAME));
assertThat(q.getMaxLat(), closeTo(40, 1E-5));

View File

@ -193,7 +193,7 @@ public class AnalysisModuleTests extends ModuleTestCase {
.put("index.analysis.analyzer.foobar.type", "standard")
.put("index.analysis.analyzer.foobar.alias","foobaz")
// analyzer aliases were removed in v5.0.0 alpha6
.put(IndexMetaData.SETTING_VERSION_CREATED, VersionUtils.randomVersionBetween(random(), Version.V_5_0_0_alpha6, null))
.put(IndexMetaData.SETTING_VERSION_CREATED, VersionUtils.randomVersionBetween(random(), Version.V_5_0_0_beta1, null))
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir().toString())
.build();
AnalysisRegistry registry = getNewRegistry(settings);