File tree 1 file changed +5
-3
lines changed
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -298,17 +298,19 @@ interface NodeListener {
298
298
void onSkip ();
299
299
}
300
300
301
- private static Exception unwrapFailure (Exception e ) {
301
+ private static Exception unwrapFailure (ShardId shardId , Exception e ) {
302
302
e = e instanceof TransportException te ? FailureCollector .unwrapTransportException (te ) : e ;
303
303
if (TransportActions .isShardNotAvailableException (e )) {
304
- return NoShardAvailableActionException .forOnShardFailureWrapper (e .getMessage ());
304
+ var ex = NoShardAvailableActionException .forOnShardFailureWrapper (e .getMessage ());
305
+ ex .setShard (shardId );
306
+ return ex ;
305
307
} else {
306
308
return e ;
307
309
}
308
310
}
309
311
310
312
private void trackShardLevelFailure (ShardId shardId , boolean fatal , Exception originalEx ) {
311
- final Exception e = unwrapFailure (originalEx );
313
+ final Exception e = unwrapFailure (shardId , originalEx );
312
314
final boolean isTaskCanceledException = ExceptionsHelper .unwrap (e , TaskCancelledException .class ) != null ;
313
315
final boolean isCircuitBreakerException = ExceptionsHelper .unwrap (e , CircuitBreakingException .class ) != null ;
314
316
shardFailures .compute (shardId , (k , current ) -> {
You can’t perform that action at this time.
0 commit comments