File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
modules/data-streams/src/javaRestTest/java/org/elasticsearch/datastreams
x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ public abstract class AbstractDataStreamIT extends ESRestTestCase {
4545 // tests such as testIgnoreDynamicBeyondLimit.
4646 .setting ("xpack.apm_data.enabled" , "false" )
4747 .setting ("xpack.otel_data.registry.enabled" , "false" )
48+ .setting ("cluster.logsdb.enabled" , "false" )
4849 .build ();
4950 protected RestClient client ;
5051
Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ public LogsDBPlugin(Settings settings) {
4848 public Collection <?> createComponents (PluginServices services ) {
4949 licenseService .setLicenseState (XPackPlugin .getSharedLicenseState ());
5050 var clusterSettings = services .clusterService ().getClusterSettings ();
51+ // The `cluster.logsdb.enabled` setting is registered by this plugin, but its value may be updated by other plugins
52+ // before this plugin registers its settings update consumer below. This means we might miss updates that occurred earlier.
53+ // To handle this, we explicitly fetch the current `cluster.logsdb.enabled` setting value from the cluster settings
54+ // and update it, ensuring we capture any prior changes.
55+ logsdbIndexModeSettingsProvider .updateClusterIndexModeLogsdbEnabled (clusterSettings .get (CLUSTER_LOGSDB_ENABLED ));
5156 clusterSettings .addSettingsUpdateConsumer (FALLBACK_SETTING , licenseService ::setSyntheticSourceFallback );
5257 clusterSettings .addSettingsUpdateConsumer (
5358 CLUSTER_LOGSDB_ENABLED ,
You can’t perform that action at this time.
0 commit comments