Skip to content

Commit

Permalink
Fork TransportRollupCapsAction to MANAGEMENT POOL (#89803) (#89811)
Browse files Browse the repository at this point in the history
We can't run these actions on the transport threads in their current form.
The fully deserialize the mapping for each index they inspect which will
take a massive amount of time if either a large number of indices or a large
number of fields (indices * fields_per_index) overall are inspected.
  • Loading branch information
original-brownbear committed Sep 6, 2022
1 parent cd9448d commit b19c2d7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/89803.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 89803
summary: Fork `TransportRollupCapsAction` to MANAGEMENT POOL
area: Rollup
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xpack.core.rollup.action.GetRollupCapsAction;
import org.elasticsearch.xpack.core.rollup.action.RollableIndexCaps;
Expand All @@ -33,7 +34,7 @@ public class TransportGetRollupCapsAction extends HandledTransportAction<GetRoll

@Inject
public TransportGetRollupCapsAction(TransportService transportService, ClusterService clusterService, ActionFilters actionFilters) {
super(GetRollupCapsAction.NAME, transportService, actionFilters, GetRollupCapsAction.Request::new);
super(GetRollupCapsAction.NAME, transportService, actionFilters, GetRollupCapsAction.Request::new, ThreadPool.Names.MANAGEMENT);
this.clusterService = clusterService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xpack.core.rollup.action.GetRollupIndexCapsAction;
import org.elasticsearch.xpack.core.rollup.action.RollableIndexCaps;
Expand All @@ -40,7 +41,13 @@ public TransportGetRollupIndexCapsAction(
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver
) {
super(GetRollupIndexCapsAction.NAME, transportService, actionFilters, GetRollupIndexCapsAction.Request::new);
super(
GetRollupIndexCapsAction.NAME,
transportService,
actionFilters,
GetRollupIndexCapsAction.Request::new,
ThreadPool.Names.MANAGEMENT
);
this.clusterService = clusterService;
this.resolver = indexNameExpressionResolver;
}
Expand Down

0 comments on commit b19c2d7

Please sign in to comment.