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/test/java/org/elasticsearch/xpack/shutdown/TransportGetShutdownStatusActionTests.java
true,
            clusterInfoService,
            snapshotsInfoService,
            allocationService,
            allocationDeciders
        );
        assertShardMigration(
            status,
            SingleNodeShutdownMetadata.Status.STALLED,
            1,
            allOf(containsString(index.getName()), containsString("[2] [primary]"))
        );
    }
    /**
     * Ensure we can detect stalled migrations when we have unassigned shards that had the shutting down node as their last known
     * node id
     */
    public void testStalledUnassigned() {
        Index index = new Index(randomAlphaOfLength(5), randomAlphaOfLengthBetween(1, 20));
        IndexMetadata imd = spy(generateIndexMetadata(index, 3, 0));
        
        doAnswer(i -> {
            if ((Integer) i.getArgument(0) < 2) {
                return Set.of(LIVE_NODE_ID);
            }
            return Set.of(SHUTTING_DOWN_NODE_ID);
        }).when(imd).inSyncAllocationIds(anyInt());
        var shard0 = TestShardRouting.newShardRouting(new ShardId(index, 0), LIVE_NODE_ID, true, ShardRoutingState.STARTED);
        var shard1 = TestShardRouting.newShardRouting(new ShardId(index, 1), LIVE_NODE_ID, true, ShardRoutingState.STARTED);