### CI Link

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

### Repro line

./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.search.aggregations.bucket.RandomSamplerIT.testRandomSamplerHistogram" -Dtests.seed=AED6446652EDAB2B -Dtests.locale=cs -Dtests.timezone=Africa/Bangui -Druntime.java=17

### Does it reproduce?

No

### Applicable branches

master

### Failure history

_No response_

### Failure excerpt

```
org.elasticsearch.search.aggregations.bucket.RandomSamplerIT > testRandomSamplerHistogram FAILED
    java.lang.AssertionError: 
    Expected: a value less than <127.55000000000001>
         but: <145.07999999999993> was greater than <127.55000000000001>
        at __randomizedtesting.SeedInfo.seed([AED6446652EDAB2B:B3962E383F3EDAC]: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.search.aggregations.bucket.RandomSamplerIT.testRandomSamplerHistogram(RandomSamplerIT.java:157)
```
server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RandomSamplerIT.java
assertThat(Math.abs(sampleMonotonicValue - trueMonotonic), lessThan(trueMonotonic * 0.1));
        assertThat(Math.abs(sampleRandomValue - trueRandom), lessThan(trueRandom * 0.1));
    }
    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/84595")
    public void testRandomSamplerHistogram() {
        Map<String, Double> sampleMonotonicValue = new HashMap<>();
        Map<String, Double> sampleRandomValue = new HashMap<>();
        Map<String, Double> sampledDocCount = new HashMap<>();
        SearchRequest sampledRequest = client().prepareSearch("idx")
            .addAggregation(
                new RandomSamplerAggregationBuilder("sampler").setProbability(0.5)
                    .subAggregation(
                        histogram("histo").field(NUMERIC_VALUE)
                            .interval(5.0)
                            .subAggregation(avg("mean_monotonic").field(MONOTONIC_VALUE))
                            .subAggregation(avg("mean_numeric").field(NUMERIC_VALUE))
                    )
            )
            .request();
        for (int i = 0; i < NUM_SAMPLE_RUNS; i++) {
            InternalRandomSampler sampler = client().search(sampledRequest).actionGet().getAggregations().get("sampler");
            Histogram histo = sampler.getAggregations().get("histo");
            for (Histogram.Bucket bucket : histo.getBuckets()) {
                sampleMonotonicValue.compute(
                    bucket.getKeyAsString(),
                    (k, v) -> ((Avg) bucket.getAggregations().get("mean_monotonic")).getValue() + (v == null ? 0 : v)
                );
                sampleRandomValue.compute(
                    bucket.getKeyAsString(),
                    (k, v) -> ((Avg) bucket.getAggregations().get("mean_numeric")).getValue() + (v == null ? 0 : v)