### CI Link

https://gradle-enterprise.elastic.co/s/sa7kgcpbjsuyo

### Repro line

./gradlew ':x-pack:plugin:esql:internalClusterTest' --tests "org.elasticsearch.xpack.esql.action.EsqlActionTaskIT.testCancelRead" -Dtests.seed=A10FD59C7183AD95 -Dbuild.snapshot=false -Dtests.jvm.argline="-Dbuild.snapshot=false" -Dtests.locale=ga-IE -Dtests.timezone=Europe/Stockholm -Druntime.java=20

### Does it reproduce?

No

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

```
org.elasticsearch.xpack.esql.action.EsqlActionTaskIT > testCancelRead FAILED
    java.lang.AssertionError: 
    Expected: a collection with size <2>
         but: collection size was <0>
        at __randomizedtesting.SeedInfo.seed([A10FD59C7183AD95:34226718C99014F4]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:956)
        at org.junit.Assert.assertThat(Assert.java:923)
        at org.elasticsearch.xpack.esql.action.EsqlActionTaskIT.lambda$getTasksStarting$2(EsqlActionTaskIT.java:229)
        at org.elasticsearch.test.ESTestCase.assertBusy(ESTestCase.java:1196)
        at org.elasticsearch.test.ESTestCase.assertBusy(ESTestCase.java:1169)
        at org.elasticsearch.xpack.esql.action.EsqlActionTaskIT.getTasksStarting(EsqlActionTaskIT.java:221)
        at org.elasticsearch.xpack.esql.action.EsqlActionTaskIT.testCancelRead(EsqlActionTaskIT.java:167)
```
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/lucene/LuceneSliceQueue.java
if (groups.size() > 1) {
                weight.get(); 
            }
            for (List<PartialLeafReaderContext> group : groups) {
                slices.add(new LuceneSlice(shardIndex, searchContext, group, weight));
            }
        }
        return new LuceneSliceQueue(slices);
    }
    static List<List<PartialLeafReaderContext>> docSlices(IndexReader indexReader, int numSlices) {
        final int totalDocCount = indexReader.maxDoc();
        final int normalMaxDocsPerSlice = totalDocCount / numSlices;
        final int extraDocsInFirstSlice = totalDocCount % numSlices;
        final List<List<PartialLeafReaderContext>> slices = new ArrayList<>();
        int docsAllocatedInCurrentSlice = 0;
        List<PartialLeafReaderContext> currentSlice = null;
        int maxDocsPerSlice = normalMaxDocsPerSlice + extraDocsInFirstSlice;
        for (LeafReaderContext ctx : indexReader.leaves()) {
            final int numDocsInLeaf = ctx.reader().maxDoc();
            int minDoc = 0;
            while (minDoc < numDocsInLeaf) {
                int numDocsToUse = Math.min(maxDocsPerSlice - docsAllocatedInCurrentSlice, numDocsInLeaf - minDoc);
                if (numDocsToUse <= 0) {
                    break;
                }
                if (currentSlice == null) {
                    currentSlice = new ArrayList<>();
                }
                currentSlice.add(new PartialLeafReaderContext(ctx, minDoc, minDoc + numDocsToUse));
                minDoc += numDocsToUse;