Skip to content

Commit

Permalink
Remove extra SearchService constructor (#90733)
Browse files Browse the repository at this point in the history
It's nice to avoid introducing too many constructors -- if we did this for all
arguments, we could have a lot of "telescoping" going on.

Follow up to #90574.
  • Loading branch information
jtibshirani committed Oct 6, 2022
1 parent c6ee824 commit e7bff7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
25 changes: 0 additions & 25 deletions server/src/main/java/org/elasticsearch/search/SearchService.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,31 +272,6 @@ public class SearchService extends AbstractLifecycleComponent implements IndexEv

private final Tracer tracer;

public SearchService(
ClusterService clusterService,
IndicesService indicesService,
ThreadPool threadPool,
ScriptService scriptService,
BigArrays bigArrays,
FetchPhase fetchPhase,
ResponseCollectorService responseCollectorService,
CircuitBreakerService circuitBreakerService,
ExecutorSelector executorSelector
) {
this(
clusterService,
indicesService,
threadPool,
scriptService,
bigArrays,
fetchPhase,
responseCollectorService,
circuitBreakerService,
executorSelector,
Tracer.NOOP
);
}

public SearchService(
ClusterService clusterService,
IndicesService indicesService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.disruption.DisruptableMockTransport;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.tracing.Tracer;
import org.elasticsearch.transport.BytesRefRecycler;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xcontent.NamedXContentRegistry;
Expand Down Expand Up @@ -1977,7 +1978,8 @@ protected void assertSnapshotOrGenericThread() {
new FetchPhase(Collections.emptyList()),
responseCollectorService,
new NoneCircuitBreakerService(),
EmptySystemIndices.INSTANCE.getExecutorSelector()
EmptySystemIndices.INSTANCE.getExecutorSelector(),
Tracer.NOOP
);
SearchPhaseController searchPhaseController = new SearchPhaseController(searchService::aggReduceContextBuilder);
actions.put(
Expand Down

0 comments on commit e7bff7d

Please sign in to comment.