Skip to content

Commit a0c27bb

Browse files
committed
Add new index setting for ignored version
1 parent a767959 commit a0c27bb

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,15 @@ public String toString() {
13461346
Property.InternalIndex
13471347
);
13481348

1349+
public static final String INDEX_IGNORE_DEPRECATION_WARNING_FOR_VERSION_KEY = "index.ignore_deprecation_warning_for_version";
1350+
public static final Setting<IndexVersion> IGNORE_INDEX_DEPRECATION_WARNING_FOR_VERSION_SETTING = Setting.versionIdSetting(
1351+
INDEX_IGNORE_DEPRECATION_WARNING_FOR_VERSION_KEY,
1352+
IndexVersions.ZERO,
1353+
IndexVersion::fromId,
1354+
Property.IndexScope,
1355+
Property.Dynamic
1356+
);
1357+
13491358
// LIFECYCLE_NAME is here an as optimization, see LifecycleSettings.LIFECYCLE_NAME and
13501359
// LifecycleSettings.LIFECYCLE_NAME_SETTING for the 'real' version
13511360
public static final String LIFECYCLE_NAME = "index.lifecycle.name";

server/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
189189
IgnoredSourceFieldMapper.SKIP_IGNORED_SOURCE_READ_SETTING,
190190
SourceFieldMapper.INDEX_MAPPER_SOURCE_MODE_SETTING,
191191
IndexSettings.RECOVERY_USE_SYNTHETIC_SOURCE_SETTING,
192+
IndexMetadata.IGNORE_INDEX_DEPRECATION_WARNING_FOR_VERSION_SETTING,
192193

193194
// validate that built-in similarities don't get redefined
194195
Setting.groupSetting("index.similarity.", (s) -> {

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/TransportResumeFollowAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,8 @@ static String[] extractLeaderShardHistoryUUIDs(Map<String, String> ccrIndexMetad
531531
MergeSchedulerConfig.MAX_THREAD_COUNT_SETTING,
532532
EngineConfig.INDEX_CODEC_SETTING,
533533
DataTier.TIER_PREFERENCE_SETTING,
534-
IndexSettings.BLOOM_FILTER_ID_FIELD_ENABLED_SETTING
534+
IndexSettings.BLOOM_FILTER_ID_FIELD_ENABLED_SETTING,
535+
IndexMetadata.IGNORE_INDEX_DEPRECATION_WARNING_FOR_VERSION_SETTING
535536
);
536537

537538
public static Settings filter(Settings originalSettings) {

0 commit comments

Comments
 (0)