File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -298,17 +298,19 @@ interface NodeListener {
298298 void onSkip ();
299299 }
300300
301- private static Exception unwrapFailure (Exception e ) {
301+ private static Exception unwrapFailure (ShardId shardId , Exception e ) {
302302 e = e instanceof TransportException te ? FailureCollector .unwrapTransportException (te ) : e ;
303303 if (TransportActions .isShardNotAvailableException (e )) {
304- return NoShardAvailableActionException .forOnShardFailureWrapper (e .getMessage ());
304+ var ex = NoShardAvailableActionException .forOnShardFailureWrapper (e .getMessage ());
305+ ex .setShard (shardId );
306+ return ex ;
305307 } else {
306308 return e ;
307309 }
308310 }
309311
310312 private void trackShardLevelFailure (ShardId shardId , boolean fatal , Exception originalEx ) {
311- final Exception e = unwrapFailure (originalEx );
313+ final Exception e = unwrapFailure (shardId , originalEx );
312314 final boolean isTaskCanceledException = ExceptionsHelper .unwrap (e , TaskCancelledException .class ) != null ;
313315 final boolean isCircuitBreakerException = ExceptionsHelper .unwrap (e , CircuitBreakingException .class ) != null ;
314316 shardFailures .compute (shardId , (k , current ) -> {
You can’t perform that action at this time.
0 commit comments