Skip to content

Commit 61bc61c

Browse files
dry
1 parent 8a1b272 commit 61bc61c

File tree

2 files changed

+1
-50
lines changed

2 files changed

+1
-50
lines changed

server/src/main/java/org/elasticsearch/action/search/AbstractSearchAsyncAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void skipShard(SearchShardIterator iterator) {
251251
successfulShardExecution();
252252
}
253253

254-
private void performPhaseOnShard(final int shardIndex, final SearchShardIterator shardIt, final SearchShardTarget shard) {
254+
protected void performPhaseOnShard(final int shardIndex, final SearchShardIterator shardIt, final SearchShardTarget shard) {
255255
if (throttleConcurrentRequests) {
256256
var pendingExecutions = pendingExecutionsPerNode.computeIfAbsent(
257257
shard.getNodeId(),

server/src/main/java/org/elasticsearch/action/search/SearchQueryThenFetchAsyncAction.java

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -525,55 +525,6 @@ private void onNodeQueryFailure(Exception e, NodeQueryRequest request, CanMatchP
525525
}
526526
}
527527

528-
protected void performPhaseOnShard(final int shardIndex, final SearchShardIterator shardIt, final SearchShardTarget shard) {
529-
final Transport.Connection connection;
530-
try {
531-
connection = getConnection(shard.getClusterAlias(), shard.getNodeId());
532-
} catch (Exception e) {
533-
onShardFailure(shardIndex, shard, shardIt, e);
534-
return;
535-
}
536-
final String indexUUID = shardIt.shardId().getIndex().getUUID();
537-
searchTransportService.sendExecuteQuery(
538-
connection,
539-
rewriteShardSearchRequest(
540-
bottomSortCollector,
541-
trackTotalHitsUpTo,
542-
buildShardSearchRequest(
543-
shardIt.shardId(),
544-
shardIt.getClusterAlias(),
545-
shardIndex,
546-
shardIt.getSearchContextId(),
547-
shardIt.getOriginalIndices(),
548-
aliasFilter.getOrDefault(indexUUID, AliasFilter.EMPTY),
549-
shardIt.getSearchContextKeepAlive(),
550-
concreteIndexBoosts.getOrDefault(indexUUID, DEFAULT_INDEX_BOOST),
551-
request,
552-
results.getNumShards(),
553-
timeProvider.absoluteStartMillis(),
554-
hasShardResponse.getAcquire()
555-
)
556-
),
557-
task,
558-
new SearchActionListener<>(shard, shardIndex) {
559-
@Override
560-
public void innerOnResponse(SearchPhaseResult result) {
561-
try {
562-
onShardResult(result);
563-
} catch (Exception exc) {
564-
// TODO: this looks like a nasty bug where it to actually happen
565-
assert false : exc;
566-
}
567-
}
568-
569-
@Override
570-
public void onFailure(Exception e) {
571-
onShardFailure(shardIndex, shard, shardIt, e);
572-
}
573-
}
574-
);
575-
}
576-
577528
public static final String NODE_SEARCH_ACTION_NAME = "indices:data/read/search[query][n]";
578529

579530
private static final CircuitBreaker NOOP_CIRCUIT_BREAKER = new NoopCircuitBreaker("request");

0 commit comments

Comments
 (0)