Downsampling is broken. Not sure why yet (likely caused by #97557). Invoking the downsample api results into:

```
org.elasticsearch.ElasticsearchSecurityException: no indices permissions found
        at org.elasticsearch.xpack.core.security.support.Exceptions.authorizationError(Exceptions.java:32) ~[?:?]
        at org.elasticsearch.xpack.core.security.authz.accesscontrol.SecurityIndexReaderWrapper.getIndicesAccessControl(SecurityIn
dexReaderWrapper.java:110) ~[?:?]
        at org.elasticsearch.xpack.core.security.authz.accesscontrol.SecurityIndexReaderWrapper.apply(SecurityIndexReaderWrapper.j
ava:76) ~[?:?]
        at org.elasticsearch.xpack.core.security.authz.accesscontrol.SecurityIndexReaderWrapper.apply(SecurityIndexReaderWrapper.j
ava:46) ~[?:?]
        at org.elasticsearch.index.shard.IndexShard.wrapSearcher(IndexShard.java:1590) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
        at org.elasticsearch.index.shard.IndexShard.wrapSearcher(IndexShard.java:1561) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
        at org.elasticsearch.index.engine.Engine$SearcherSupplier.acquireSearcher(Engine.java:1321) ~[elasticsearch-8.11.0-SNAPSHO
T.jar:?]
        at org.elasticsearch.index.engine.Engine.acquireSearcher(Engine.java:774) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
        at org.elasticsearch.index.shard.IndexShard.acquireSearcher(IndexShard.java:1549) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
        at org.elasticsearch.xpack.downsample.DownsampleShardIndexer.<init>(DownsampleShardIndexer.java:115) ~[?:?]
        at org.elasticsearch.xpack.downsample.DownsampleShardPersistentTaskExecutor.startDownsampleShardIndexer(DownsampleShardPersistentTaskExecutor.java:111) ~[?:?]
        at org.elasticsearch.xpack.downsample.DownsampleShardPersistentTaskExecutor$1.doRun(DownsampleShardPersistentTaskExecutor.java:87) ~[?:?]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) ~[elasticsearch-8.11.0-SNAPSHOT.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1623) ~[?:?]
```
x-pack/plugin/downsample/src/main/java/org/elasticsearch/xpack/downsample/DownsampleShardIndexer.java
final AbstractDownsampleFieldProducer[] fieldProducers = new AbstractDownsampleFieldProducer[fieldValueFetchers.size()];
            final FormattedDocValues[] formattedDocValues = new FormattedDocValues[fieldValueFetchers.size()];
            for (int i = 0; i < fieldProducers.length; i++) {
                fieldProducers[i] = fieldValueFetchers.get(i).fieldProducer();
                formattedDocValues[i] = fieldValueFetchers.get(i).getLeaf(ctx);
            }
            return new LeafBucketCollector() {
                @Override
                public void collect(int docId, long owningBucketOrd) throws IOException {
                    task.addNumReceived(1);
                    final BytesRef tsid = aggCtx.getTsid();
                    assert tsid != null : "Document without [" + TimeSeriesIdFieldMapper.NAME + "] field was found.";
                    final int tsidOrd = aggCtx.getTsidOrd();
                    final long timestamp = timestampField.resolution().roundDownToMillis(aggCtx.getTimestamp());
                    boolean tsidChanged = tsidOrd != downsampleBucketBuilder.tsidOrd();
                    if (tsidChanged || timestamp < lastHistoTimestamp) {
                        lastHistoTimestamp = Math.max(
                            rounding.round(timestamp),
                            searchExecutionContext.getIndexSettings().getTimestampBounds().startTime()
                        );
                    }
                    task.setLastSourceTimestamp(timestamp);
                    task.setLastTargetTimestamp(lastHistoTimestamp);
                    if (logger.isTraceEnabled()) {
                        logger.trace(
                            "Doc: [{}] - _tsid: [{}], @timestamp: [{}}] -> downsample bucket ts: [{}]",
                            docId,
                            DocValueFormat.TIME_SERIES_ID.format(tsid),
                            timestampFormat.format(timestamp),
                            timestampFormat.format(lastHistoTimestamp)