Skip to content

Commit e1a7d06

Browse files
committed
revert
1 parent 8bb4cfd commit e1a7d06

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/DataNodeRequestSender.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ private void trySendingRequestsForPendingShards(TargetShards targetShards, Compu
113113
break;
114114
}
115115
for (ShardId shardId : pendingShardIds) {
116-
if (targetShards.getShard(shardId).remainingNodes.isEmpty()) shardFailures.compute(
117-
shardId,
118-
(k, v) -> new ShardFailure(
119-
true,
120-
v == null ? new NoShardAvailableActionException(shardId, "no shard copies found") : v.failure
121-
)
122-
);
116+
if (targetShards.getShard(shardId).remainingNodes.isEmpty()) {
117+
shardFailures.compute(
118+
shardId,
119+
(k, v) -> new ShardFailure(
120+
true,
121+
v == null ? new NoShardAvailableActionException(shardId, "no shard copies found") : v.failure
122+
)
123+
);
124+
}
123125
}
124126
if (reportedFailure
125127
|| (allowPartialResults == false && shardFailures.values().stream().anyMatch(shardFailure -> shardFailure.fatal))) {

0 commit comments

Comments
 (0)