File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -393,9 +393,6 @@ tests:
393393- class : org.elasticsearch.packaging.test.DockerTests
394394 method : test026InstallBundledRepositoryPluginsViaConfigFile
395395 issue : https://github.com/elastic/elasticsearch/issues/127158
396- - class : org.elasticsearch.xpack.esql.plugin.DataNodeRequestSenderIT
397- method : testSearchWhileRelocating
398- issue : https://github.com/elastic/elasticsearch/issues/127188
399396- class : org.elasticsearch.xpack.remotecluster.CrossClusterEsqlRCS2EnrichUnavailableRemotesIT
400397 method : testEsqlEnrichWithSkipUnavailable
401398 issue : https://github.com/elastic/elasticsearch/issues/127368
Original file line number Diff line number Diff line change @@ -328,8 +328,8 @@ private void acquireSearchContexts(
328328 }
329329 final var doAcquire = ActionRunnable .supply (listener , () -> {
330330 final List <SearchContext > searchContexts = new ArrayList <>(targetShards .size ());
331- SearchContext context = null ;
332331 for (IndexShard shard : targetShards ) {
332+ SearchContext context = null ;
333333 try {
334334 var aliasFilter = aliasFilters .getOrDefault (shard .shardId ().getIndex (), AliasFilter .EMPTY );
335335 var shardRequest = new ShardSearchRequest (
@@ -342,15 +342,16 @@ private void acquireSearchContexts(
342342 // we need to limit the number of active search contexts here or in SearchService
343343 context = searchService .createSearchContext (shardRequest , SearchService .NO_TIMEOUT );
344344 context .preProcess ();
345- searchContexts .add (context );
346345 } catch (Exception e ) {
347346 if (addShardLevelFailure (shard .shardId (), e )) {
348347 IOUtils .close (context );
348+ continue ;
349349 } else {
350350 IOUtils .closeWhileHandlingException (context , () -> IOUtils .close (searchContexts ));
351351 throw e ;
352352 }
353353 }
354+ searchContexts .add (context );
354355 }
355356 return searchContexts ;
356357 });
You can’t perform that action at this time.
0 commit comments