File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -261,13 +261,15 @@ static GetDeploymentStatsAction.Response addFailedRoutes(
261261 List <AssignmentStats .NodeStats > nodeStats = new ArrayList <>();
262262
263263 for (var routingEntry : nonStartedEntries .getValue ().entrySet ()) {
264- nodeStats .add (
265- AssignmentStats .NodeStats .forNotStartedState (
266- nodes .get (routingEntry .getKey ()),
267- routingEntry .getValue ().getState (),
268- routingEntry .getValue ().getReason ()
269- )
270- );
264+ if (nodes .nodeExists (routingEntry .getKey ())) {
265+ nodeStats .add (
266+ AssignmentStats .NodeStats .forNotStartedState (
267+ nodes .get (routingEntry .getKey ()),
268+ routingEntry .getValue ().getState (),
269+ routingEntry .getValue ().getReason ()
270+ )
271+ );
272+ }
271273 }
272274
273275 nodeStats .sort (Comparator .comparing (n -> n .getNode ().getId ()));
You can’t perform that action at this time.
0 commit comments