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
)
            );
        }
        return ClusterState.builder(ClusterState.EMPTY_STATE)
            .metadata(
                Metadata.builder()
                    .indices(indicesTable)
                    .putCustom(
                        NodesShutdownMetadata.TYPE,
                        new NodesShutdownMetadata(
                            Map.of(
                                SHUTTING_DOWN_NODE_ID,
                                SingleNodeShutdownMetadata.builder()
                                    .setType(shutdownType)
                                    .setStartedAtMillis(randomNonNegativeLong())
                                    .setReason(this.getTestName())
                                    .setNodeId(SHUTTING_DOWN_NODE_ID)
                                    .build()
                            )
                        )
                    )
            )
            .nodes(discoveryNodesBuilder)
            .routingTable(indexRoutingTable)
            .build();
    }
    private ClusterState setIlmOperationMode(ClusterState state, OperationMode operationMode) {
        return ClusterState.builder(state)
            .metadata(
                Metadata.builder(state.metadata())