### 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
// 
        // 
        final Version repositoryMetaVersion = finalizeSnapshotContext.repositoryMetaVersion();
        final boolean writeShardGens = SnapshotsService.useShardGenerations(repositoryMetaVersion);
        final Consumer<Exception> onUpdateFailure = e -> finalizeSnapshotContext.onFailure(
            new SnapshotException(metadata.name(), snapshotId, "failed to update snapshot in repository", e)
        );
        final Executor executor = threadPool.executor(ThreadPool.Names.SNAPSHOT);
        final boolean writeIndexGens = SnapshotsService.useIndexGenerations(repositoryMetaVersion);
        final StepListener<RepositoryData> repoDataListener = new StepListener<>();
        getRepositoryData(repoDataListener);
        repoDataListener.whenComplete(ingRepositoryData -> {
            final int ingSnapshotCount = ingRepositoryData.getSnapshotIds().size();
            if (ingSnapshotCount >= maxSnapshotCount) {
                finalizeSnapshotContext.onFailure(
                    new RepositoryException(
                        metadata.name(),
                        "Cannot add another snapshot to this repository as it "
                            + "already contains ["
                            + ingSnapshotCount
                            + "] snapshots and is configured to hold up to ["
                            + maxSnapshotCount
                            + "] snapshots only."
                    )
                );
                return;
            }
            final Map<IndexId, String> indexMetas;
            final Map<String, String> indexMetaIdentifiers;
            if (writeIndexGens) {