Skip to content

Commit c084542

Browse files
authored
Bump version to 6.0.0-beta1
This commit does two things: - bumps the version from 6.0.0-alpha3 to 6.0.0-beta1 - renames the 6.0.0-alpha3 version constant to 6.0.0-beta1 Relates #25621
1 parent c75ddd2 commit c084542

File tree

17 files changed

+55
-58
lines changed

17 files changed

+55
-58
lines changed

buildSrc/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# When updating elasticsearch, please update 'rest' version in core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
2-
elasticsearch = 6.0.0-alpha3
2+
elasticsearch = 6.0.0-beta1
33
lucene = 7.0.0-snapshot-ad2cb77
44

55
# optional dependencies

core/src/main/java/org/elasticsearch/Version.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ public class Version implements Comparable<Version> {
9494
public static final int V_6_0_0_alpha2_ID = 6000002;
9595
public static final Version V_6_0_0_alpha2 =
9696
new Version(V_6_0_0_alpha2_ID, org.apache.lucene.util.Version.LUCENE_7_0_0);
97-
public static final int V_6_0_0_alpha3_ID = 6000003;
98-
public static final Version V_6_0_0_alpha3 =
99-
new Version(V_6_0_0_alpha3_ID, org.apache.lucene.util.Version.LUCENE_7_0_0);
100-
public static final Version CURRENT = V_6_0_0_alpha3;
97+
public static final int V_6_0_0_beta1_ID = 6000026;
98+
public static final Version V_6_0_0_beta1 =
99+
new Version(V_6_0_0_beta1_ID, org.apache.lucene.util.Version.LUCENE_7_0_0);
100+
public static final Version CURRENT = V_6_0_0_beta1;
101101

102102
// unreleased versions must be added to the above list with the suffix _UNRELEASED (with the exception of CURRENT)
103103

@@ -112,8 +112,8 @@ public static Version readVersion(StreamInput in) throws IOException {
112112

113113
public static Version fromId(int id) {
114114
switch (id) {
115-
case V_6_0_0_alpha3_ID:
116-
return V_6_0_0_alpha3;
115+
case V_6_0_0_beta1_ID:
116+
return V_6_0_0_beta1;
117117
case V_6_0_0_alpha2_ID:
118118
return V_6_0_0_alpha2;
119119
case V_6_0_0_alpha1_ID:

core/src/main/java/org/elasticsearch/action/admin/indices/analyze/AnalyzeRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public void readFrom(StreamInput in) throws IOException {
240240
field = in.readOptionalString();
241241
explain = in.readBoolean();
242242
attributes = in.readStringArray();
243-
if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha3)) {
243+
if (in.getVersion().onOrAfter(Version.V_6_0_0_beta1)) {
244244
normalizer = in.readOptionalString();
245245
}
246246
}
@@ -256,7 +256,7 @@ public void writeTo(StreamOutput out) throws IOException {
256256
out.writeOptionalString(field);
257257
out.writeBoolean(explain);
258258
out.writeStringArray(attributes);
259-
if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha3)) {
259+
if (out.getVersion().onOrAfter(Version.V_6_0_0_beta1)) {
260260
out.writeOptionalString(normalizer);
261261
}
262262
}

core/src/main/java/org/elasticsearch/index/analysis/SynonymTokenFilterFactory.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@
3434
import org.elasticsearch.index.IndexSettings;
3535
import org.elasticsearch.indices.analysis.AnalysisModule;
3636

37-
import java.io.BufferedReader;
3837
import java.io.IOException;
3938
import java.io.Reader;
40-
import java.nio.file.Files;
4139
import java.util.List;
4240

4341
public class SynonymTokenFilterFactory extends AbstractTokenFilterFactory {
@@ -58,7 +56,7 @@ public SynonymTokenFilterFactory(IndexSettings indexSettings, Environment env, A
5856

5957
this.ignoreCase =
6058
settings.getAsBooleanLenientForPreEs6Indices(indexSettings.getIndexVersionCreated(), "ignore_case", false, deprecationLogger);
61-
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_0_0_alpha3) && settings.get("ignore_case") != null) {
59+
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_0_0_beta1) && settings.get("ignore_case") != null) {
6260
deprecationLogger.deprecated(
6361
"This tokenize synonyms with whatever tokenizer and token filters appear before it in the chain. " +
6462
"If you need ignore case with this filter, you should set lowercase filter before this");
@@ -68,7 +66,7 @@ public SynonymTokenFilterFactory(IndexSettings indexSettings, Environment env, A
6866
settings.getAsBooleanLenientForPreEs6Indices(indexSettings.getIndexVersionCreated(), "expand", true, deprecationLogger);
6967

7068
// for backward compatibility
71-
if (indexSettings.getIndexVersionCreated().before(Version.V_6_0_0_alpha3)) {
69+
if (indexSettings.getIndexVersionCreated().before(Version.V_6_0_0_beta1)) {
7270
String tokenizerName = settings.get("tokenizer", "whitespace");
7371
AnalysisModule.AnalysisProvider<TokenizerFactory> tokenizerFactoryFactory =
7472
analysisRegistry.getTokenizerProvider(tokenizerName, indexSettings);

core/src/main/java/org/elasticsearch/index/mapper/IdFieldMapper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public Query termsQuery(List<?> values, QueryShardContext context) {
131131
if (indexOptions() != IndexOptions.NONE) {
132132
failIfNotIndexed();
133133
BytesRef[] bytesRefs = new BytesRef[values.size()];
134-
final boolean is5xIndex = context.indexVersionCreated().before(Version.V_6_0_0_alpha3);
134+
final boolean is5xIndex = context.indexVersionCreated().before(Version.V_6_0_0_beta1);
135135
for (int i = 0; i < bytesRefs.length; i++) {
136136
BytesRef id;
137137
if (is5xIndex) {
@@ -166,7 +166,7 @@ public IndexFieldData.Builder fielddataBuilder() {
166166
public IndexFieldData<?> build(IndexSettings indexSettings, MappedFieldType fieldType, IndexFieldDataCache cache,
167167
CircuitBreakerService breakerService, MapperService mapperService) {
168168
final IndexFieldData<?> fieldData = fieldDataBuilder.build(indexSettings, fieldType, cache, breakerService, mapperService);
169-
if (indexSettings.getIndexVersionCreated().before(Version.V_6_0_0_alpha3)) {
169+
if (indexSettings.getIndexVersionCreated().before(Version.V_6_0_0_beta1)) {
170170
// ids were indexed as utf-8
171171
return fieldData;
172172
}
@@ -288,7 +288,7 @@ public void postParse(ParseContext context) throws IOException {}
288288
@Override
289289
protected void parseCreateField(ParseContext context, List<IndexableField> fields) throws IOException {
290290
if (fieldType.indexOptions() != IndexOptions.NONE || fieldType.stored()) {
291-
if (context.mapperService().getIndexSettings().getIndexVersionCreated().onOrAfter(Version.V_6_0_0_alpha3)) {
291+
if (context.mapperService().getIndexSettings().getIndexVersionCreated().onOrAfter(Version.V_6_0_0_beta1)) {
292292
BytesRef id = Uid.encodeId(context.sourceToParse().id());
293293
fields.add(new Field(NAME, id, fieldType));
294294
} else {

core/src/main/java/org/elasticsearch/index/mapper/MapperService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.elasticsearch.common.regex.Regex;
3636
import org.elasticsearch.common.settings.Setting;
3737
import org.elasticsearch.common.settings.Setting.Property;
38-
import org.elasticsearch.common.settings.Settings;
3938
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
4039
import org.elasticsearch.common.xcontent.XContentFactory;
4140
import org.elasticsearch.common.xcontent.XContentParser;
@@ -805,7 +804,7 @@ public Term createUidTerm(String type, String id) {
805804
if (hasMapping(type) == false) {
806805
return null;
807806
}
808-
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_0_0_alpha3)) {
807+
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_0_0_beta1)) {
809808
assert indexSettings.isSingleType();
810809
return new Term(IdFieldMapper.NAME, Uid.encodeId(id));
811810
} else if (indexSettings.isSingleType()) {

core/src/main/java/org/elasticsearch/index/mapper/UidFieldMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public Query termsQuery(List<?> values, @Nullable QueryShardContext context) {
158158
if (uidString.startsWith(expectedPrefix)) {
159159
String id = uidString.substring(expectedPrefix.length(), uidString.length());
160160
BytesRef encodedId;
161-
if (context.indexVersionCreated().onOrAfter(Version.V_6_0_0_alpha3)) {
161+
if (context.indexVersionCreated().onOrAfter(Version.V_6_0_0_beta1)) {
162162
encodedId = Uid.encodeId(id);
163163
} else {
164164
encodedId = new BytesRef(id);

core/src/main/java/org/elasticsearch/index/shard/IndexShard.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ public static Engine.Index prepareIndex(DocumentMapperForType docMapper, Version
679679
doc.addDynamicMappingsUpdate(docMapper.getMapping());
680680
}
681681
Term uid;
682-
if (indexCreatedVersion.onOrAfter(Version.V_6_0_0_alpha3)) {
682+
if (indexCreatedVersion.onOrAfter(Version.V_6_0_0_beta1)) {
683683
uid = new Term(IdFieldMapper.NAME, Uid.encodeId(doc.id()));
684684
} else if (docMapper.getDocumentMapper().idFieldMapper().fieldType().indexOptions() != IndexOptions.NONE) {
685685
uid = new Term(IdFieldMapper.NAME, doc.id());
@@ -776,7 +776,7 @@ private static Engine.Delete prepareDelete(String type, String id, Term uid, lon
776776
}
777777

778778
private Term extractUidForDelete(String type, String id) {
779-
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_0_0_alpha3)) {
779+
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_0_0_beta1)) {
780780
assert indexSettings.isSingleType();
781781
// This is only correct because we create types dynamically on delete operations
782782
// otherwise this could match the same _id from a different type

core/src/main/java/org/elasticsearch/index/translog/Translog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private ArrayList<TranslogReader> recoverFromFiles(Checkpoint checkpoint) throws
223223
final long minGenerationToRecoverFrom;
224224
if (checkpoint.minTranslogGeneration < 0) {
225225
final Version indexVersionCreated = indexSettings().getIndexVersionCreated();
226-
assert indexVersionCreated.before(Version.V_6_0_0_alpha3) :
226+
assert indexVersionCreated.before(Version.V_6_0_0_beta1) :
227227
"no minTranslogGeneration in checkpoint, but index was created with version [" + indexVersionCreated + "]";
228228
minGenerationToRecoverFrom = deletionPolicy.getMinTranslogGenerationForRecovery();
229229
} else {

core/src/main/java/org/elasticsearch/index/translog/TranslogStats.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
100100
public void readFrom(StreamInput in) throws IOException {
101101
numberOfOperations = in.readVInt();
102102
translogSizeInBytes = in.readVLong();
103-
if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha3)) {
103+
if (in.getVersion().onOrAfter(Version.V_6_0_0_beta1)) {
104104
uncommittedOperations = in.readVInt();
105105
uncommittedSizeInBytes = in.readVLong();
106106
} else {
@@ -113,7 +113,7 @@ public void readFrom(StreamInput in) throws IOException {
113113
public void writeTo(StreamOutput out) throws IOException {
114114
out.writeVInt(numberOfOperations);
115115
out.writeVLong(translogSizeInBytes);
116-
if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha3)) {
116+
if (out.getVersion().onOrAfter(Version.V_6_0_0_beta1)) {
117117
out.writeVInt(uncommittedOperations);
118118
out.writeVLong(uncommittedSizeInBytes);
119119
}

0 commit comments

Comments
 (0)