The way, the CS batching in `TransportRolloverAction` is written is broken for large batches of tasks. Each task result will contain the cluster state after applying the task. This consumes unmanageable amounts of memory for large cluster states if a larger number of rollovers gets batched, causing master nodes to run out of heap from endless `RolloverResult` getting retained.

<img width="691" alt="image" src="https://user-images.githubusercontent.com/6490959/193704411-85979256-69bf-4db4-818e-f5d8d7888605.png">

We must find a way to not retain cluster states like this in the task results.
server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java
} else {
            final Optional<IndexStats> indexStats = Optional.ofNullable(statsResponse)
                .map(stats -> stats.getIndex(metadata.getIndex().getName()));
            final DocsStats docsStats = indexStats.map(stats -> stats.getPrimaries().getDocs()).orElse(null);
            final long maxPrimaryShardSize = indexStats.stream()
                .map(IndexStats::getShards)
                .filter(Objects::nonNull)
                .flatMap(Arrays::stream)
                .filter(shard -> shard.getShardRouting().primary())
                .map(ShardStats::getStats)
                .mapToLong(shard -> shard.docs.getTotalSizeInBytes())
                .max()
                .orElse(0);
            final long maxPrimaryShardDocs = indexStats.stream()
                .map(IndexStats::getShards)
                .filter(Objects::nonNull)
                .flatMap(Arrays::stream)
                .filter(shard -> shard.getShardRouting().primary())
                .map(ShardStats::getStats)
                .mapToLong(shard -> shard.docs.getCount())
                .max()
                .orElse(0);
            return new Condition.Stats(
                docsStats == null ? 0 : docsStats.getCount(),
                metadata.getCreationDate(),
                new ByteSizeValue(docsStats == null ? 0 : docsStats.getTotalSizeInBytes()),
                new ByteSizeValue(maxPrimaryShardSize),
                maxPrimaryShardDocs
            );
        }