Repository navigation
Revert "Trim test_max_bytes_ratio_before_external_distinct to fit the client timeout" - #121477
Merged
alexey-milovidov merged 1 commit intoSep 22, 2026
Merged
Conversation
…he client timeout"
Contributor
nihalzp
enabled auto-merge
September 22, 2026 02:49
alexey-milovidov
disabled auto-merge
September 22, 2026 02:58
alexey-milovidov
deleted the
revert-121096-trim-external-distinct-ratio-test
branch
September 22, 2026 02:58
This was referenced Sep 22, 2026
Merged
This was referenced Sep 26, 2026
pull Bot
pushed a commit
to Dream-hu/ClickHouse
that referenced
this pull request
Sep 27, 2026
test_max_bytes_ratio_before_external_distinct[user] fails on Integration tests (amd_asan_ubsan, db disk, 1/8) at the integration harness's 600 second per-query cap (DEFAULT_QUERY_TIMEOUT in helpers/client.py, applied unconditionally): since ClickHouse#121454 merged, 10 of 1972 runs on that job failed with "timed out after 600 seconds" at the ratio = 0.3 spilling call, one of them on master, and the passing runs have a median of 587 s. The test proves a memory-limit behaviour by consuming memory up to the limit, so the limit sets its runtime. At node_user's 10Gi profile limit the rejection half needs an unspilled footprint above 10 GiB, i.e. 100M ~85-byte keys, and on the ASan build the spilling half alone takes 412 s locally. ClickHouse#121096 had moved both parameters to 4Gi instances with 7M keys of 800 bytes; ClickHouse#121454 then skipped [server] under ASan, measured on that tree, and kept [user] because a user limit counts tracked bytes, not RSS; ClickHouse#121477 reverted ClickHouse#121096 in full on the strength of [server] failures (its query filters distinct[server]), which put [user] back on the workload that times out. This gives the [user] row its own query, the 7M x 800-byte workload with max_memory_usage_for_user = '4Gi' in its SETTINGS, on the existing node_user, so no instance is added. A user's memory tracker is reset when the user's last running query finishes (ProcessList), and the next query applies its own limit, so the 4 GiB holds after the group_by and sort tests' 10Gi queries on the same node. [server] keeps its query, node and ASan skip; only its query moved into the parametrize row. The trimmed [user] row passed all 152 runs of the failing job that carried ClickHouse#121096 (median 76 s). max_block_size is pinned to its default because the final merge holds one block of every spilled run at once, and a random draw above ~83.9K rows makes each 800-byte-key block a 128 MiB allocation. Measured on the ASan build (query_log.memory_usage of the spilling query, pin removed, draw forced): 84000 -> 3.45 GiB, 92237 -> 3.61 GiB, 96000 -> 3.33 GiB of the 4 GiB limit, and 88000 rejects the spilling query itself. The peak is not monotone in the draw (100000 -> 2.73 GiB, 50000 -> 2.04 GiB), because the size of the unspilled tail depends on how the input chunks align with the run size. Pinned, it is 2.57 GiB with 58 runs and 14 tail chunks at every draw. 04493_external_distinct and its siblings pin the same value. Measured locally, ASan+UBSan, db disk flavour, harness containers (cpus: 5, mem_limit: 12g): the spilling query drops from 411.6 s to 43.5 s; with the client cap scaled to 200 s the old test times out and the new one passes; the unspilled peak is 5.69 GiB, so the ratio = 0 half is still rejected, by "User memory limit exceeded ... maximum: 4.00 GiB"; 50 of 50 repetitions and the whole module twice passed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #121096
It broke the CI.
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=e033cea645358fa98672769636b5c979d8adcd26&name_0=MasterCI&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%201%2F8%29&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%201%2F8%29
https://play.clickhouse.com/play?user=play#CldJVEgKICAgICd0ZXN0X21heF9ieXRlc19yYXRpb19iZWZvcmVfZXh0ZXJuYWxfb3JkZXJfZ3JvdXBfYnlfZm9yX3NlcnZlci90ZXN0LnB5Ojp0ZXN0X21heF9ieXRlc19yYXRpb19iZWZvcmVfZXh0ZXJuYWxfZGlzdGluY3Rbc2VydmVyXScgQVMgbmFtZV9zdWJzdHIsCiAgICA5MCBBUyBpbnRlcnZhbF9kYXlzLAogICAgKCdTdGF0ZWxlc3MgdGVzdHMgKGFzYW4pJywgJ1N0YXRlbGVzcyB0ZXN0cyAoYWRkcmVzcyknLCAnU3RhdGVsZXNzIHRlc3RzIChhZGRyZXNzLCBhY3Rpb25zKScsICdJbnRlZ3JhdGlvbiB0ZXN0cyAoYXNhbikgWzEvM10nLCAnU3RhdGVsZXNzIHRlc3RzICh0c2FuKSBbMS8zXScpIEFTIGJhY2twb3J0X2FuZF9yZWxlYXNlX3NwZWNpZmljX2NoZWNrcwpTRUxFQ1QKICAgIHRvU3RhcnRPZkRheShjaGVja19zdGFydF90aW1lKSBBUyBkLAogICAgY291bnQoKSwKICAgIGdyb3VwVW5pcUFycmF5KHB1bGxfcmVxdWVzdF9udW1iZXIpIEFTIHBycywKICAgIGFueShyZXBvcnRfdXJsKQpGUk9NIGNoZWNrcwpXSEVSRSAoKG5vdygpIC0gdG9JbnRlcnZhbERheShpbnRlcnZhbF9kYXlzKSkgPD0gY2hlY2tfc3RhcnRfdGltZSkgQU5EIChwdWxsX3JlcXVlc3RfbnVtYmVyIE5PVCBJTiAoCiAgICBTRUxFQ1QgcHVsbF9yZXF1ZXN0X251bWJlciBBUyBwcm4KICAgIEZST00gY2hlY2tzCiAgICBXSEVSRSAocHJuICE9IDApIEFORCAoKG5vdygpIC0gdG9JbnRlcnZhbERheShpbnRlcnZhbF9kYXlzKSkgPD0gY2hlY2tfc3RhcnRfdGltZSkgQU5EIChjaGVja19uYW1lIElOIChiYWNrcG9ydF9hbmRfcmVsZWFzZV9zcGVjaWZpY19jaGVja3MpKQopKSBBTkQgKHBvc2l0aW9uKHRlc3RfbmFtZSwgbmFtZV9zdWJzdHIpID4gMCkgQU5EIHRlc3Rfc3RhdHVzID0gJ0ZBSUwnCkdST1VQIEJZIGQKT1JERVIgQlkgZCBERVNDCg==
Workflow [PR]
Sync PR [sync-upstream/pr/121477]
Version info
26.10.1.397-master(included in26.10and later)