**Build scan:**
https://gradle-enterprise.elastic.co/s/qjiew7o2n4nkc/tests/:x-pack:plugin:searchable-snapshots:internalClusterTest/org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests/testNodesCachesStats

**Reproduction line:**
```
./gradlew ':x-pack:plugin:searchable-snapshots:internalClusterTest' --tests "org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests.testNodesCachesStats" -Dtests.seed=54224AAD6241354D -Dtests.locale=vi-VN -Dtests.timezone=America/Catamarca -Druntime.java=17
```

**Applicable branches:**
main

**Reproduces locally?:**
Yes

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests&tests.test=testNodesCachesStats

**Failure excerpt:**
```
com.carrotsearch.randomizedtesting.UncaughtExceptionError: Captured an uncaught exception in thread: Thread[id=171, name=elasticsearch[node_s1][searchable_snapshots_cache_fetch_async][T#2], state=RUNNABLE, group=TGRP-NodesCachesStatsIntegTests]

  at __randomizedtesting.SeedInfo.seed([54224AAD6241354D:8737EE96278AE5FF]:0)

  Caused by: java.lang.AssertionError: 1048576 < 1048576

    at __randomizedtesting.SeedInfo.seed([54224AAD6241354D]:0)
    at org.elasticsearch.blobcache.common.ProgressListenableActionFuture.onProgress(ProgressListenableActionFuture.java:84)
    at org.elasticsearch.blobcache.common.SparseFileTracker.onGapProgress(SparseFileTracker.java:469)
    at org.elasticsearch.blobcache.common.SparseFileTracker$Gap.onProgress(SparseFileTracker.java:552)
    at org.elasticsearch.blobcache.shared.SharedBlobCacheService$CacheFileRegion$1.lambda$doRun$0(SharedBlobCacheService.java:745)
    at org.elasticsearch.xpack.searchablesnapshots.store.input.FrozenIndexInput.writeCacheFile(FrozenIndexInput.java:254)
    at org.elasticsearch.xpack.searchablesnapshots.store.input.FrozenIndexInput.lambda$readWithoutBlobCache$1(FrozenIndexInput.java:143)
    at org.elasticsearch.blobcache.shared.SharedBlobCacheService$CacheFile.lambda$populateAndRead$1(SharedBlobCacheService.java:863)
    at org.elasticsearch.blobcache.shared.SharedBlobCacheService$CacheFileRegion$1.doRun(SharedBlobCacheService.java:740)
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:958)
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.lang.Thread.run(Thread.java:833)

```
x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/store/input/FrozenIndexInput.java
);
        final long end = relativePos + length;
        logger.trace("writing range [{}-{}] to cache file [{}]", relativePos, end, cacheFile);
        long bytesCopied = 0L;
        long remaining = length;
        final ByteBuffer buf = writeBuffer.get().clear();
        while (remaining > 0L) {
            final int bytesRead = BlobCacheUtils.readSafe(input, buf, relativePos, remaining, cacheFile);
            if (buf.hasRemaining()) {
                break;
            }
            long bytesWritten = positionalWrite(fc, fileChannelPos + bytesCopied, buf);
            bytesCopied += bytesWritten;
            progressUpdater.accept(bytesCopied);
            remaining -= bytesRead;
        }
        
        final int remainder = buf.position() % SharedBytes.PAGE_SIZE;
        final int adjustment = remainder == 0 ? 0 : SharedBytes.PAGE_SIZE - remainder;
        buf.position(buf.position() + adjustment);
        long bytesWritten = positionalWrite(fc, fileChannelPos + bytesCopied, buf);
        bytesCopied += bytesWritten;
        final long adjustedBytesCopied = bytesCopied - adjustment; 
        assert adjustedBytesCopied == length;
        progressUpdater.accept(adjustedBytesCopied);
        final long endTimeNanos = stats.currentTimeNanos();
        stats.addCachedBytesWritten(adjustedBytesCopied, endTimeNanos - startTimeNanos);
    }
    @Override
    public FrozenIndexInput clone() {