Skip to content

Commit

Permalink
Disable CCR REST endpoints if CCR disabled (#33619)
Browse files Browse the repository at this point in the history
This commit avoids enabling the CCR REST endpoints if CCR is disabled.
  • Loading branch information
jasontedor authored Sep 12, 2018
1 parent dcdacd2 commit 20476b9
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ public List<RestHandler> getRestHandlers(Settings settings, RestController restC
IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter,
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<DiscoveryNodes> nodesInCluster) {
if (enabled == false) {
return emptyList();
}

return Arrays.asList(
// stats API
new RestCcrStatsAction(settings, restController),
Expand Down Expand Up @@ -228,10 +232,7 @@ public List<ExecutorBuilder<?>> getExecutorBuilders(Settings settings) {
return Collections.emptyList();
}

FixedExecutorBuilder ccrTp = new FixedExecutorBuilder(settings, CCR_THREAD_POOL_NAME,
32, 100, "xpack.ccr.ccr_thread_pool");

return Collections.singletonList(ccrTp);
return Collections.singletonList(new FixedExecutorBuilder(settings, CCR_THREAD_POOL_NAME, 32, 100, "xpack.ccr.ccr_thread_pool"));
}

protected XPackLicenseState getLicenseState() { return XPackPlugin.getSharedLicenseState(); }
Expand Down

0 comments on commit 20476b9

Please sign in to comment.