mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2026-10-28 16:18:23 +08:00
The test fires concurrent queries A (low overcommit denominator, should be killed) and B (high denominator, should survive) under a shared user memory limit. After PR #101574 tuned the parameters, a ~1% residual failure remained where ALL B queries were also killed (2 master failures in 12 days, ~6 PR failures/week). Root cause: both A and B used numbers(5000000) (~40 MB each). With 20 B queries, their collective memory (800 MB) far exceeded the 300 MB user limit. After the overcommit tracker killed all A queries, B's total still exceeded the limit, causing B queries to also be killed. Fix: - Reduce B query data from numbers(5000000) to numbers(1000000) (~8 MB each) - Reduce QUERY_COUNT from 40 to 20 After the fix, B's collective memory (10 × 8 MB = 80 MB) is well within the 300 MB limit once A queries are killed, so at least one B query can finish. Total memory demand (10 × 40 + 10 × 8 = 480 MB) still comfortably exceeds the limit to trigger the overcommit tracker. The test intent is preserved: it still verifies that queries with low memory_overcommit_ratio_denominator are killed first while queries with high denominator survive under memory pressure. Validated with 50 consecutive passes locally.