### 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
);
                sampledDocCount.compute(bucket.getKeyAsString(), (k, v) -> bucket.getDocCount() + (v == null ? 0 : v));
            }
        }
        for (String key : sampledDocCount.keySet()) {
            sampledDocCount.put(key, sampledDocCount.get(key) / NUM_SAMPLE_RUNS);
            sampleRandomValue.put(key, sampleRandomValue.get(key) / NUM_SAMPLE_RUNS);
            sampleMonotonicValue.put(key, sampleMonotonicValue.get(key) / NUM_SAMPLE_RUNS);
        }
        SearchResponse trueValueResponse = client().prepareSearch("idx")
            .addAggregation(
                histogram("histo").field(NUMERIC_VALUE)
                    .interval(5.0)
                    .subAggregation(avg("mean_monotonic").field(MONOTONIC_VALUE))
                    .subAggregation(avg("mean_numeric").field(NUMERIC_VALUE))
            )
            .get();
        Histogram histogram = trueValueResponse.getAggregations().get("histo");
        for (Histogram.Bucket bucket : histogram.getBuckets()) {
            long numDocs = bucket.getDocCount();
            double countError = (numDocs * 0.5) * 0.1;
            assertThat(Math.abs(sampledDocCount.get(bucket.getKeyAsString()) - numDocs), lessThan(countError));
            double trueMonotonic = ((Avg) bucket.getAggregations().get("mean_monotonic")).getValue();
            double trueRandom = ((Avg) bucket.getAggregations().get("mean_numeric")).getValue();
            assertThat(Math.abs(sampleMonotonicValue.get(bucket.getKeyAsString()) - trueMonotonic), lessThan(trueMonotonic * 0.1));
            assertThat(Math.abs(sampleRandomValue.get(bucket.getKeyAsString()) - trueRandom), lessThan(trueRandom * 0.1));
        }
    }
}