Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove invalid asserts in MergingDigest. (#96928)
The asserts were misfiring in this test: ``` REPRODUCE WITH: ./gradlew ':server:test' --tests "org.elasticsearch.search.aggregations.metrics.InternalMedianAbsoluteDeviationTests.testReduceRandom" -Dtests.seed=AA1D81AD056870F0 -Dtests.locale=en-CA -Dtests.timezone=US/Eastern -Druntime.java=20 org.elasticsearch.search.aggregations.metrics.InternalMedianAbsoluteDeviationTests > testReduceRandom FAILED java.lang.AssertionError at __randomizedtesting.SeedInfo.seed([AA1D81AD056870F0:6A202DBC2335E9A6]:0) at org.elasticsearch.tdigest.MergingDigest.merge(MergingDigest.java:316) at org.elasticsearch.tdigest.MergingDigest.mergeNewValues(MergingDigest.java:298) at org.elasticsearch.tdigest.MergingDigest.mergeNewValues(MergingDigest.java:288) at org.elasticsearch.tdigest.MergingDigest.quantile(MergingDigest.java:485) at org.elasticsearch.tdigest.HybridDigest.quantile(HybridDigest.java:141) at org.elasticsearch.search.aggregations.metrics.TDigestState.quantile(TDigestState.java:247) at org.elasticsearch.search.aggregations.metrics.InternalMedianAbsoluteDeviation.computeMedianAbsoluteDeviation(InternalMedianAbsoluteDeviation.java:38) at org.elasticsearch.search.aggregations.metrics.InternalMedianAbsoluteDeviation.<init>(InternalMedianAbsoluteDeviation.java:48) at org.elasticsearch.search.aggregations.metrics.InternalMedianAbsoluteDeviationTests.createTestInstance(InternalMedianAbsoluteDeviationTests.java:33) at org.elasticsearch.search.aggregations.metrics.InternalMedianAbsoluteDeviationTests.createTestInstance(InternalMedianAbsoluteDeviationTests.java:23) ``` They should have been removed earlier, it's possible for the first and the last centroid to have weight > 1. Related to #95903
- Loading branch information