**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
final long endingSeqNo = shard.seqNoStats().getMaxSeqNo();
                    logger.trace("snapshot for recovery; current size is [{}]", estimateNumberOfHistoryOperations(startingSeqNo));
                    final Translog.Snapshot phase2Snapshot = shard.newChangesSnapshot(
                        "peer-recovery",
                        startingSeqNo,
                        Long.MAX_VALUE,
                        false,
                        false,
                        true
                    );
                    resources.add(phase2Snapshot);
                    retentionLock.close();
                    
                    
                    final long maxSeenAutoIdTimestamp = shard.getMaxSeenAutoIdTimestamp();
                    final long maxSeqNoOfUpdatesOrDeletes = shard.getMaxSeqNoOfUpdatesOrDeletes();
                    final RetentionLeases retentionLeases = shard.getRetentionLeases();
                    final long mappingVersionOnPrimary = shard.indexSettings().getIndexMetadata().getMappingVersion();
                    phase2(
                        startingSeqNo,
                        endingSeqNo,
                        phase2Snapshot,
                        maxSeenAutoIdTimestamp,
                        maxSeqNoOfUpdatesOrDeletes,
                        retentionLeases,
                        mappingVersionOnPrimary,
                        sendSnapshotStep
                    );
                }, onFailure)
            );