Skip to content

Commit 27e1e5b

Browse files
authored
TSDB: fix error without feature flag (elastic#80945)
When you haven't enable the tsdb feature flag we would refuse to start. That's bad because we will likely release with the feature flag disabled. This should get us starting again. It fixes: * We tried to register a settings update consumer for the `end_time` for the tsdb index even when the `end_time` setting wasn't registered. * Pass the tsdb feature flag to internal cluster tests.
1 parent cbcd901 commit 27e1e5b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

server/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ if (BuildParams.isSnapshotBuild() == false) {
132132
tasks.named("test").configure {
133133
systemProperty 'es.index_mode_feature_flag_registered', 'true'
134134
}
135+
tasks.named("internalClusterTest").configure {
136+
systemProperty 'es.index_mode_feature_flag_registered', 'true'
137+
}
135138
}
136139

137140
tasks.named("thirdPartyAudit").configure {

server/src/main/java/org/elasticsearch/index/IndexSettings.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,9 @@ public IndexSettings(final IndexMetadata indexMetadata, final Settings nodeSetti
813813
scopedSettings.addSettingsUpdateConsumer(INDEX_MAPPING_DEPTH_LIMIT_SETTING, this::setMappingDepthLimit);
814814
scopedSettings.addSettingsUpdateConsumer(INDEX_MAPPING_FIELD_NAME_LENGTH_LIMIT_SETTING, this::setMappingFieldNameLengthLimit);
815815
scopedSettings.addSettingsUpdateConsumer(INDEX_MAPPING_DIMENSION_FIELDS_LIMIT_SETTING, this::setMappingDimensionFieldsLimit);
816-
scopedSettings.addSettingsUpdateConsumer(TIME_SERIES_END_TIME, this::updateTimeSeriesEndTime);
816+
if (IndexSettings.isTimeSeriesModeEnabled()) {
817+
scopedSettings.addSettingsUpdateConsumer(TIME_SERIES_END_TIME, this::updateTimeSeriesEndTime);
818+
}
817819
}
818820

819821
private void setSearchIdleAfter(TimeValue searchIdleAfter) {

0 commit comments

Comments
 (0)