### CI Link

https://gradle-enterprise.elastic.co/s/ou2sap2dhy3q2/tests/:server:internalClusterTest/org.elasticsearch.snapshots.SharedClusterSnapshotRestoreIT/testDataFileFailureDuringSnapshot

### Repro line

./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.snapshots.SharedClusterSnapshotRestoreIT.testDataFileFailureDuringSnapshot" -Dtests.seed=37B64CEE1DCEACEB -Dtests.locale=uk -Dtests.timezone=Africa/Lusaka -Druntime.java=17

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

```
java.lang.Exception: Test abandoned because suite timeout was reached. 
    at __randomizedtesting.SeedInfo.seed([37B64CEE1DCEACEB]:0)
```
server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java
),
                    e
                );
            }
        }
    }
    /**
     * Ensures that {@link RepositoryData}  the given {@code safeGeneration} actually physically s in the repository.
     * This method is used by {@link #writeIndexGen} to make sure that no writes are executed on top of a conly modified repository.
     * This check is necessary because {@link RepositoryData} is mostly read from the cached value in {@link #latestKnownRepositoryData}
     * which could be stale in the broken situation of a con write to the repository.
     *
     * @param safeGeneration generation to verify ence 
     * @param onFailure      callback to invoke with failure in case the repository generation is not physically found in the repository
     */
    private boolean ensureSafeGenerationExists(long safeGeneration, Consumer<Exception> onFailure) throws IOException {
        logger.debug("Ensure generation [{}] that is the basis  this write s in [{}]", safeGeneration, metadata.name());
        if (safeGeneration != RepositoryData.EMPTY_REPO_GEN && blobContainer().blobExists(INDEX_FILE_PREFIX + safeGeneration) == false) {
            Tuple<Long, String> previousWriterInfo = null;
            Exception readRepoDataEx = null;
            try {
                previousWriterInfo = readLastWriterInfo();
            } catch (Exception ex) {
                readRepoDataEx = ex;
            }
            final Exception exception = new RepositoryException(
                metadata.name(),
                "con modification of the index-N file, expected  generation ["
                    + safeGeneration
                    + "] but it was not found in the repository."