Repository navigation
Cherry pick #122494 to 26.9: Run the user-limit case of the external DISTINCT ratio test at 4 GiB to fit the ASan query timeout - #128907
Conversation
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 #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. #121096 had moved both parameters to 4Gi instances with 7M keys of 800 bytes; #121454 then skipped [server] under ASan, measured on that tree, and kept [user] because a user limit counts tracked bytes, not RSS; #121477 reverted #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 #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]>
…-4gib Run the user-limit case of the external `DISTINCT` ratio test at 4 GiB to fit the ASan query timeout
Resolve the conflict in test_max_bytes_ratio_before_external_order_group_by_for_server/test.py. 26.9 has neither #120751 (the `sanitizer_build` dict) nor #121454 (the `limit_follows_rss` parameter and the ASan skip of the `[server]` case), so only the change of #122494 itself is ported: each case's query moves into its parametrize row, and the `[user]` row runs the 7M x 800-byte query with `max_memory_usage_for_user = '4Gi'`. The 26.9 sanitizer checks and the `[server]` query are kept as they are. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The conflict is in the I ran the 26.9 ASan build of #128781 (26.9.26.1): the This leaves I cannot push to |
|
🕵 Pushed the resolution from groeneai's fork as a fast-forward ( |
Original pull-request #122494
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Before you resolve anything
Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job