### 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/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/EsqlActionTaskIT.java
READ_DESCRIPTION = """
            \\_LuceneSourceOperator[dataPartitioning = SHARD, maxPageSize = PAGE_SIZE, limit = 2147483647]
            \\_ValuesSourceReaderOperator[field = pause_me]
            \\_AggregationOperator[mode = INITIAL, aggs = sum of longs]
            \\_ExchangeSinkOperator""".replace("PAGE_SIZE", Integer.toString(PAGE_SIZE));
        MERGE_DESCRIPTION = """
            \\_ExchangeSourceOperator[]
            \\_AggregationOperator[mode = FINAL, aggs = sum of longs]
            \\_LimitOperator[limit = 10000]
            \\_OutputOperator[columns = sum(pause_me)]""";
        XContentBuilder mapping = JsonXContent.contentBuilder().startObject();
        mapping.startObject("runtime");
        {
            mapping.startObject("pause_me");
            {
                mapping.field("type", "long");
                mapping.startObject("script").field("source", "").field("lang", "pause").endObject();
            }
            mapping.endObject();
        }
        mapping.endObject();
        client().admin().indices().prepareCreate("test").setSettings(Map.of("number_of_shards", 1)).setMapping(mapping.endObject()).get();
        BulkRequestBuilder bulk = client().prepareBulk().setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
        for (int i = 0; i < NUM_DOCS; i++) {
            bulk.add(client().prepareIndex("test").setId(Integer.toString(i)).setSource("foo", i));
        }
        bulk.get();
    }
    public void testTaskContents() throws Exception {
        ActionFuture<EsqlQueryResponse> response = startEsql();