**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
public void onFailure(Exception e) {
                try {
                    Releasables.closeExpectNoException(permit);
                } finally {
                    l1.onFailure(e);
                }
            }
        }, l2 -> {
            cancellableThreads.checkForCancel();
            ensureNotRelocatedPrimary(primary);
            action.accept(l2);
        })), primary.getThreadPool().generic());
    }
    static void runUnderPrimaryPermit(
        CheckedRunnable<Exception> action,
        IndexShard primary,
        CancellableThreads cancellableThreads,
        ActionListener<Void> listener
    ) {
        runUnderPrimaryPermit(l -> ActionListener.completeWith(l, () -> {
            action.run();
            return null;
        }), primary, cancellableThreads, listener);
    }
    private static void ensureNotRelocatedPrimary(IndexShard indexShard) {
        
        
        if (indexShard.isRelocatedPrimary()) {
            throw new IndexShardRelocatedException(indexShard.shardId());
        }