Skip to content

Commit

Permalink
Fix look-ahead-time setting validation for release builds (#88087)
Browse files Browse the repository at this point in the history
Follow up to #87847

Adding a setting polling callback will fail if the setting is not there.
  • Loading branch information
benwtrent authored Jun 28, 2022
1 parent 8e9cd99 commit 87bc952
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@ public List<RestHandler> getRestHandlers(
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<DiscoveryNodes> nodesInCluster
) {
indexScopedSettings.addSettingsUpdateConsumer(LOOK_AHEAD_TIME, value -> {
TimeValue timeSeriesPollInterval = service.get().pollInterval;
additionalLookAheadTimeValidation(value, timeSeriesPollInterval);
});
if (IndexSettings.isTimeSeriesModeEnabled()) {
indexScopedSettings.addSettingsUpdateConsumer(LOOK_AHEAD_TIME, value -> {
TimeValue timeSeriesPollInterval = service.get().pollInterval;
additionalLookAheadTimeValidation(value, timeSeriesPollInterval);
});
}

var createDsAction = new RestCreateDataStreamAction();
var deleteDsAction = new RestDeleteDataStreamAction();
Expand Down

0 comments on commit 87bc952

Please sign in to comment.