Fix flaky test_overcommit_tracker/test_user_overcommit#100567
Fix flaky test_overcommit_tracker/test_user_overcommit#100567alexey-milovidov wants to merge 1 commit intomasterfrom
Conversation
The test is probabilistic: it relies on memory pressure to kill queries with low `memory_overcommit_ratio_denominator` while sparing those with high ratio. Under MSan (which has ~3x memory overhead), a single attempt could kill all queries, causing the assertion to fail. Two changes: - Reduce `numbers(2500000)` to `numbers(1000000)` to lower per-query memory usage, making it more likely that B queries survive. - Add a retry loop (up to 5 attempts) since the test is inherently probabilistic. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100404&sha=4e239671fdc3523725369f5ad6028b4a52c43b45&name_0=PR&name_1=Integration%20tests%20%28amd_msan%2C%204%2F6%29 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Workflow [PR], commit [edf15b4] Summary: ✅ AI ReviewSummaryThis PR reduces memory load and adds retries in Findings
ClickHouse Rules
Final Verdict
|
|
|
||
| USER_TEST_QUERY_A = "SELECT groupArray(number) FROM numbers(2500000) SETTINGS max_memory_usage_for_user=2000000000,memory_overcommit_ratio_denominator=1" | ||
| USER_TEST_QUERY_B = "SELECT groupArray(number) FROM numbers(2500000) SETTINGS max_memory_usage_for_user=2000000000,memory_overcommit_ratio_denominator=80000000" | ||
| USER_TEST_QUERY_A = "SELECT groupArray(number) FROM numbers(1000000) SETTINGS max_memory_usage_for_user=2000000000,memory_overcommit_ratio_denominator=1" |
There was a problem hiding this comment.
numbers(...) from 2500000 to 1000000, but the test still asserts only that at least one B query finishes. With lower memory pressure, it can pass even when overcommit selection never happens (e.g. all queries succeed), so it may stop validating the intended behavior.
Please also assert that at least one low-priority A query is rejected with MEMORY_LIMIT_EXCEEDED in a successful attempt (or otherwise prove overcommit arbitration happened).
Fix flaky
test_overcommit_tracker/test_user_overcommitunder MSan.The test is probabilistic: it relies on memory pressure to kill queries with low
memory_overcommit_ratio_denominatorwhile sparing those with high ratio. Under MSan (~3x memory overhead), all queries could get killed in a single attempt.Changes:
numbers(2500000)tonumbers(1000000)to lower per-query memory usageCI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100404&sha=4e239671fdc3523725369f5ad6028b4a52c43b45&name_0=PR&name_1=Integration%20tests%20%28amd_msan%2C%204%2F6%29
Related issue: #45173
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes