If the lag detector's logger is set to `DEBUG` then the master will capture the hot threads on the lagging node and report them in its logs. However it's quite possible for this log message to be many kB in size, and log messages are apparently truncated at 10kB by default.

We should find another way to report this information to avoid hitting this size limit. Perhaps simply split the hot threads output up across multiple log messages, or perhaps find a different way to report it.
server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java
* one of them becomes leader and publishes first state (with STATE_NOT_RECOVERED_BLOCK) to old leader, which accepts it.
     * Old leader is initiating an election at the same time, and wins election. It becomes leader again, but as it previously
     * successfully completed state recovery, is never reset to a state where state recovery can be retried.
     */
    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/91449")
    public void testStateRecoveryResetAfterPreviousLeadership() {
        try (Cluster cluster = new Cluster(3)) {
            cluster.runRandomly();
            cluster.stabilise();
            final ClusterNode leader = cluster.getAnyLeader();
            final ClusterNode follower1 = cluster.getAnyNodeExcept(leader);
            final ClusterNode follower2 = cluster.getAnyNodeExcept(leader, follower1);
            
            for (ClusterNode clusterNode : Arrays.asList(follower1, follower2)) {
                clusterNode.close();
                cluster.clusterNodes.forEach(cn -> cluster.deterministicTaskQueue.scheduleNow(cn.onNode(new Runnable() {
                    @Override
                    public void run() {
                        cn.transportService.disconnectFromNode(clusterNode.getLocalNode());
                    }
                    @Override
                    public String toString() {
                        return "disconnect from " + clusterNode.getLocalNode() + " after shutdown";
                    }
                })));
                cluster.clusterNodes.replaceAll(cn -> cn == clusterNode ? cn.restartedNode() : cn);
            }
            cluster.stabilise();
        }
    }