Disable CCR REST endpoints if CCR disabled (#33619)
This commit avoids enabling the CCR REST endpoints if CCR is disabled.
This commit is contained in:
parent
dcdacd2f3f
commit
20476b9e06
|
@ -163,6 +163,10 @@ public class Ccr extends Plugin implements ActionPlugin, PersistentTaskPlugin, E
|
||||||
IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter,
|
IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter,
|
||||||
IndexNameExpressionResolver indexNameExpressionResolver,
|
IndexNameExpressionResolver indexNameExpressionResolver,
|
||||||
Supplier<DiscoveryNodes> nodesInCluster) {
|
Supplier<DiscoveryNodes> nodesInCluster) {
|
||||||
|
if (enabled == false) {
|
||||||
|
return emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
// stats API
|
// stats API
|
||||||
new RestCcrStatsAction(settings, restController),
|
new RestCcrStatsAction(settings, restController),
|
||||||
|
@ -228,10 +232,7 @@ public class Ccr extends Plugin implements ActionPlugin, PersistentTaskPlugin, E
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
FixedExecutorBuilder ccrTp = new FixedExecutorBuilder(settings, CCR_THREAD_POOL_NAME,
|
return Collections.singletonList(new FixedExecutorBuilder(settings, CCR_THREAD_POOL_NAME, 32, 100, "xpack.ccr.ccr_thread_pool"));
|
||||||
32, 100, "xpack.ccr.ccr_thread_pool");
|
|
||||||
|
|
||||||
return Collections.singletonList(ccrTp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected XPackLicenseState getLicenseState() { return XPackPlugin.getSharedLicenseState(); }
|
protected XPackLicenseState getLicenseState() { return XPackPlugin.getSharedLicenseState(); }
|
||||||
|
|
Loading…
Reference in New Issue