Skip to content

Commit

Permalink
Fix node construction
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Oct 27, 2023
1 parent 7e52a49 commit f6088b0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
4 changes: 0 additions & 4 deletions server/src/main/java/org/elasticsearch/node/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
import org.elasticsearch.indices.cluster.IndicesClusterStateService;
import org.elasticsearch.indices.recovery.PeerRecoverySourceService;
import org.elasticsearch.indices.store.IndicesStore;
import org.elasticsearch.inference.InferenceServiceRegistry;
import org.elasticsearch.ingest.FieldInferenceBulkRequestPreprocessor;
import org.elasticsearch.ingest.IngestService;
import org.elasticsearch.monitor.MonitorService;
import org.elasticsearch.monitor.fs.FsHealthService;
import org.elasticsearch.monitor.jvm.JvmInfo;
import org.elasticsearch.node.internal.TerminationHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,6 @@ private void construct(Environment initialEnvironment, NodeServiceProvider servi
IngestService.createGrokThreadWatchdog(environment, threadPool),
documentParsingObserverSupplier
);
final FieldInferenceBulkRequestPreprocessor fieldInferenceBulkRequestPreprocessor = new FieldInferenceBulkRequestPreprocessor(
documentParsingObserverSupplier,
client
);
final SetOnce<RepositoriesService> repositoriesServiceReference = new SetOnce<>();
final ClusterInfoService clusterInfoService = serviceProvider.newClusterInfoService(
pluginsService,
Expand Down Expand Up @@ -708,6 +704,13 @@ private void construct(Environment initialEnvironment, NodeServiceProvider servi
searchModule.getRequestCacheKeyDifferentiator(),
documentParsingObserverSupplier
);
final FieldInferenceBulkRequestPreprocessor fieldInferenceBulkRequestPreprocessor = new FieldInferenceBulkRequestPreprocessor(
documentParsingObserverSupplier,
clusterService,
indicesService,
clusterModule.getIndexNameExpressionResolver(),
client
);

final var parameters = new IndexSettingProvider.Parameters(indicesService::createIndexMapperServiceForValidation);
IndexSettingProviders indexSettingProviders = new IndexSettingProviders(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,13 @@ protected void assertSnapshotOrGenericThread() {
null,
() -> DocumentParsingObserver.EMPTY_INSTANCE
),
new FieldInferenceBulkRequestPreprocessor(() -> DocumentParsingObserver.EMPTY_INSTANCE, client),
new FieldInferenceBulkRequestPreprocessor(
() -> DocumentParsingObserver.EMPTY_INSTANCE,
clusterService,
indicesService,
indexNameExpressionResolver,
client
),
client,
actionFilters,
indexNameExpressionResolver,
Expand Down

0 comments on commit f6088b0

Please sign in to comment.