Currently, `TransportGetShutdownStatusAction` is executed in a transport thread, this action can do a substantial amount of work (O(# shards) in some cases) in the transport thread preventing pending transport tasks to make progress and potentially causing cluster instability. This action should be dispatched into a different thread pool to avoid such issues.
x-pack/plugin/shutdown/src/main/java/org/elasticsearch/xpack/shutdown/TransportGetShutdownStatusAction.java
if (ilmWillMoveShardEventually) {
                logger.debug(
                    format(
                        "shard [%s] [%s] of index [%s] cannot move, but ILM is shrinking that index so assuming it will move",
                        pair.shardId().getId(),
                        pair.primary() ? "primary" : "replica",
                        pair.index().getName()
                    )
                );
            }
            return ilmWillMoveShardEventually;
        }
        return false;
    }
    private static boolean hasShardCopyOnAnotherNode(ClusterState clusterState, ShardRouting shardRouting, Set<String> shuttingDownNodes) {
        return clusterState.routingTable()
            .allShards(shardRouting.index().getName())
            .stream()
            .filter(sr -> sr.id() == shardRouting.id())
            
            
            .filter(ShardRouting::started)
            .anyMatch(routing -> shuttingDownNodes.contains(routing.currentNodeId()) == false);
    }
    @Override
    protected ClusterBlockException checkBlock(GetShutdownStatusAction.Request request, ClusterState state) {
        return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
    }
}