Skip to content

Revert index.mode: time_series #78570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions qa/mixed-cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {
numberOfNodes = 4
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
setting 'xpack.security.enabled', 'false'
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

tasks.register("${baseName}#mixedClusterTest", StandaloneRestIntegTestTask) {
Expand Down
5 changes: 0 additions & 5 deletions qa/smoke-test-multinode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* Side Public License, v 1.
*/

import org.elasticsearch.gradle.internal.info.BuildParams

apply plugin: 'elasticsearch.internal-testclusters'
apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
Expand All @@ -27,9 +25,6 @@ testClusters.matching { it.name == "integTest" }.configureEach {

testClusters.configureEach {
setting 'xpack.security.enabled', 'false'
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

tasks.named("integTest").configure {
Expand Down
5 changes: 0 additions & 5 deletions rest-api-spec/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.elasticsearch.gradle.internal.info.BuildParams

apply plugin: 'elasticsearch.build'
apply plugin: 'elasticsearch.publish'
apply plugin: 'elasticsearch.rest-resources'
Expand Down Expand Up @@ -34,9 +32,6 @@ artifacts {

testClusters.configureEach {
module ':modules:mapper-extras'
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

tasks.named("test").configure {enabled = false }
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.elasticsearch.indices.IndicesRequestCache;
import org.elasticsearch.indices.ShardLimitValidator;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
Expand All @@ -49,7 +50,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {

public static final Predicate<String> INDEX_SETTINGS_KEY_PREDICATE = (s) -> s.startsWith(IndexMetadata.INDEX_SETTING_PREFIX);

private static final Set<Setting<?>> ALWAYS_ENABLED_BUILT_IN_INDEX_SETTINGS = org.elasticsearch.core.Set.of(
public static final Set<Setting<?>> BUILT_IN_INDEX_SETTINGS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
MaxRetryAllocationDecider.SETTING_ALLOCATION_MAX_RETRY,
MergeSchedulerConfig.AUTO_THROTTLE_SETTING,
MergeSchedulerConfig.MAX_MERGE_COUNT_SETTING,
Expand Down Expand Up @@ -178,18 +179,9 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
}
}
}, Property.IndexScope), // this allows similarity settings to be passed
Setting.groupSetting("index.analysis.", Property.IndexScope)); // this allows analysis settings to be passed
Setting.groupSetting("index.analysis.", Property.IndexScope) // this allows analysis settings to be passed

public static final Set<Setting<?>> BUILT_IN_INDEX_SETTINGS = builtInIndexSettings();

private static Set<Setting<?>> builtInIndexSettings() {
if (false == IndexSettings.isTimeSeriesModeEnabled()) {
return ALWAYS_ENABLED_BUILT_IN_INDEX_SETTINGS;
}
Set<Setting<?>> result = new HashSet<>(ALWAYS_ENABLED_BUILT_IN_INDEX_SETTINGS);
result.add(IndexSettings.MODE);
return org.elasticsearch.core.Set.copyOf(result);
}
)));

public static final IndexScopedSettings DEFAULT_SCOPED_SETTINGS = new IndexScopedSettings(Settings.EMPTY, BUILT_IN_INDEX_SETTINGS);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1422,28 +1422,7 @@ public static ByteSizeValue parseByteSize(String s, ByteSizeValue minValue, Byte
* @return the setting object
*/
public static <T extends Enum<T>> Setting<T> enumSetting(Class<T> clazz, String key, T defaultValue, Property... properties) {
return enumSetting(clazz, key, defaultValue, s -> {}, properties);
}

/**
* Creates a setting where the allowed values are defined as enum constants. All enum constants must be uppercase.
*
* @param clazz the enum class
* @param key the key for the setting
* @param defaultValue the default value for this setting
* @param validator validator for this setting
* @param properties properties for this setting like scope, filtering...
* @param <T> the generics type parameter reflecting the actual type of the enum
* @return the setting object
*/
public static <T extends Enum<T>> Setting<T> enumSetting(
Class<T> clazz,
String key,
T defaultValue,
Validator<T> validator,
Property... properties
) {
return new Setting<>(key, defaultValue.toString(), e -> Enum.valueOf(clazz, e.toUpperCase(Locale.ROOT)), validator, properties);
return new Setting<>(key, defaultValue.toString(), e -> Enum.valueOf(clazz, e.toUpperCase(Locale.ROOT)), properties);
}

/**
Expand Down
60 changes: 0 additions & 60 deletions server/src/main/java/org/elasticsearch/index/IndexMode.java

This file was deleted.

Loading