**Build scan:**
https://gradle-enterprise.elastic.co/s/dxnvahurwubcu/tests/:server:internalClusterTest/org.elasticsearch.action.admin.indices.create.CreateIndexIT/testCreateAndDeleteIndexConcurrently

**Reproduction line:**
```
./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.action.admin.indices.create.CreateIndexIT.testCreateAndDeleteIndexConcurrently" -Dtests.seed=3ED3285ADA7A0152 -Dtests.locale=is -Dtests.timezone=Africa/Tunis -Druntime.java=20
```

**Applicable branches:**
main, 8.8

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.action.admin.indices.create.CreateIndexIT&tests.test=testCreateAndDeleteIndexConcurrently

**Failure excerpt:**
```
java.lang.Exception: Test abandoned because suite timeout was reached.

  at __randomizedtesting.SeedInfo.seed([3ED3285ADA7A0152]:0)

```
server/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java
throw new IndexShardClosedException(request.shardId());
        }
        cancellableThreads.checkForCancel();
        StopWatch stopWatch = new StopWatch().start();
        logger.trace("finalizing recovery");
        /*
         * Before marking the shard as in-sync we acquire an operation permit. We do this so that there is a barrier between marking a
         * shard as in-sync and relocating a shard. If we acquire the permit then no relocation handoff can complete before we are done
         * marking the shard as in-sync. If the relocation handoff holds all the permits then after the handoff completes and we acquire
         * the permit then the state of the shard will be relocated and this recovery will fail.
         */
        final SubscribableListener<Void> markInSyncStep = new SubscribableListener<>();
        runUnderPrimaryPermit(
            () -> shard.markAllocationIdAsInSync(request.targetAllocationId(), targetLocalCheckpoint),
            shard,
            cancellableThreads,
            markInSyncStep
        );
        final SubscribableListener<Long> finalizeListener = new SubscribableListener<>();
        markInSyncStep.addListener(listener.delegateFailureAndWrap((l, ignored) -> {
            final long globalCheckpoint = shard.getLastKnownGlobalCheckpoint(); 
            cancellableThreads.checkForCancel();
            recoveryTarget.finalizeRecovery(globalCheckpoint, trimAboveSeqNo, finalizeListener.map(ignored2 -> globalCheckpoint));
        }));
        final SubscribableListener<Void> updateGlobalCheckpointStep = new SubscribableListener<>();
        finalizeListener.addListener(
            listener.delegateFailureAndWrap(
                (l, globalCheckpoint) -> runUnderPrimaryPermit(
                    () -> shard.updateGlobalCheckpointForShard(request.targetAllocationId(), globalCheckpoint),
                    shard,