FrankChen021 opened a new issue, #20627: URL: https://github.com/apache/druid/issues/20627
_This issue was generated automatically by Claude Code (Anthropic's AI coding agent) running a scheduled CI-triage routine on behalf of @FrankChen021. Analysis and suggested fixes are AI-produced; please verify before acting on them._ **Status:** Open: no fix PR **Subject:** `ReservoirSegmentSamplerTest.testSegmentsFromMorePopulousServerAreMoreLikelyToBePicked` (server, `unit tests / unit tests(main) (25, R*,B*,P*)`) **Failures:** 0 · **First seen:** 2026-10-16 · **Last seen:** 2026-10-17 ### Root cause The test runs `ReservoirSegmentSampler.pickMovableSegmentsFrom` 50 times over 1000 segments and asserts each server's share of picks within ±2% of the total. At the 5% sample size only 2500 segments are picked, so the tolerance is ±50 against a standard deviation of about 24 for server0 and 20 for the other servers (≈2.1σ and 2.6σ). About 5% of runs fail on the first attempt. Both occurrences are in the 5% case (1061 vs 1000, 552 vs 500), the sampler itself is behaving correctly, and neither commit touches the coordinator. So far each one has passed on the surefire retry. ### Suggested fix Scale the tolerance with the sample size instead of a fixed 2%, e.g. `error = 4 * Math.sqrt(totalSegmentsPicked * p * (1 - p))` with `p` = 0.4 for server0 and 0.2 otherwise, or use more iterations for the 5% and 10% cases. ### Occurrences Failed push-triggered master jobs only. The daily triage routine adds one row per new failed job. | Date | Commit | Job | Failure log | Detail | Reported in | |---|---|---|---|---|---| | 2026-10-16 | dc4f8a06a8 (#20595) | `unit tests / unit tests(main) (25, R*,B*,P*) / test-jdk25-[R*,B*,P*]` | [job 116763805787](https://github.com/apache/druid/actions/runs/38835568339/job/116763805787) | `expected: <1000.0> but was: <1061.0>` at line 283 (server0, 5% sample); 1/2 attempts failed (passed on retry) | #20437 | | 2026-10-17 | afdd2be759 (#20598) | `unit tests / unit tests(main) (25, R*,B*,P*) / test-jdk25-[R*,B*,P*]` | [job 117275208863](https://github.com/apache/druid/actions/runs/38991673535/job/117275208863) | `expected: <500.0> but was: <552.0>` at line 286 (non-zero server, 5% sample); 1/2 attempts failed (passed on retry) | #20437 | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
