**Build scan:**
https://gradle-enterprise.elastic.co/s/xvwrlxusnxdgu/tests/:qa:rolling-upgrade:v8.6.1%23oneThirdUpgradedTest/org.elasticsearch.upgrades.SnapshotBasedRecoveryIT/testSnapshotBasedRecovery

**Reproduction line:**
```
./gradlew ':qa:rolling-upgrade:v8.6.1#oneThirdUpgradedTest' -Dtests.class="org.elasticsearch.upgrades.SnapshotBasedRecoveryIT" -Dtests.method="testSnapshotBasedRecovery" -Dtests.seed=32151106DB58AD22 -Dtests.bwc=true -Dtests.locale=en-MT -Dtests.timezone=Asia/Colombo -Druntime.java=17
```

**Applicable branches:**
main

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.upgrades.SnapshotBasedRecoveryIT&tests.test=testSnapshotBasedRecovery

**Failure excerpt:**
```
java.lang.AssertionError: timed out waiting for green state for index [snapshot_based_recovery] cluster state [{
  "cluster_name" : "v8.6.1",
  "cluster_uuid" : "ETWjuovuQXC6pr6CN8pJXA",
  "version" : 391,
  "state_uuid" : "y7ss0aZLQvab9JIDk7jppg",
  "master_node" : "tsyOGVI1T5iBSTLS0zL29A",
  ...
```
server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/DesiredBalanceComputer.java
private static final Logger logger = LogManager.getLogger(DesiredBalanceComputer.class);
    private final ThreadPool threadPool;
    private final ShardsAllocator delegateAllocator;
    protected final MeanMetric iterations = new MeanMetric();
    public static final Setting<TimeValue> PROGRESS_LOG_INTERVAL_SETTING = Setting.timeSetting(
        "cluster.routing.allocation.desired_balance.progress_log_interval",
        TimeValue.timeValueMinutes(1),
        TimeValue.ZERO,
        Setting.Property.Dynamic,
        Setting.Property.NodeScope
    );
    private TimeValue progressLogInterval;
    public DesiredBalanceComputer(ClusterSettings clusterSettings, ThreadPool threadPool, ShardsAllocator delegateAllocator) {
        this.threadPool = threadPool;
        this.delegateAllocator = delegateAllocator;
        clusterSettings.initializeAndWatch(PROGRESS_LOG_INTERVAL_SETTING, value -> this.progressLogInterval = value);
    }
    public DesiredBalance compute(
        DesiredBalance previousDesiredBalance,
        DesiredBalanceInput desiredBalanceInput,