**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
}
    private boolean isTargetSameHistory() {
        final String targetHistoryUUID = request.metadataSnapshot().getHistoryUUID();
        assert targetHistoryUUID != null : "incoming target history missing";
        return targetHistoryUUID.equals(shard.getHistoryUUID());
    }
    private int estimateNumberOfHistoryOperations(long startingSeqNo) throws IOException {
        return shard.countChanges("peer-recovery", startingSeqNo, Long.MAX_VALUE);
    }
    /**
     * Run {@code action} while holding a primary permit, checking for cancellation both before and after. Completing the listener passed to
     * {@code action} releases the permit before passing the result through to {@code outerListener}.
     */
    static <T> void runUnderPrimaryPermit(
        Consumer<ActionListener<T>> action,
        IndexShard primary,
        CancellableThreads cancellableThreads,
        ActionListener<T> listener
    ) {
        primary.acquirePrimaryOperationPermit(listener.delegateFailure((l1, permit) -> ActionListener.run(new ActionListener<T>() {
            @Override
            public void onResponse(T result) {
                ActionListener.completeWith(l1, () -> {
                    try (permit) {
                        cancellableThreads.checkForCancel();
                    }
                    return result;
                });
            }
            @Override