Fix 01281_group_by_limit_memory_tracking flackiness#11119
Fix 01281_group_by_limit_memory_tracking flackiness#11119alexey-milovidov merged 2 commits intoClickHouse:masterfrom
Conversation
|
To sum up our discussion on TG, the main problems with the test are:
This PR fixes none of the above, but tweaks the test to stop failing for now -- well, this is also useful, no objections. A fix for the above issues could be to use query log data instead of memory profiler, and maybe add a metric for "how much memory was still allocated when the query ended", but we're not sure this would work. Or maybe we don't have to test for it at all, if it's complicated. By the way, to use query log data, we don't even have to assign a custom query id -- we can just add something unique to the query text, and filter by it. |
This was an attempt to make test green ASAP, but once I saw that it does not fix "anything", I've marked it as draft.
Right now query_log cannot be used for this, since there is no information about deallocated memory, and it can be too late to write it to query_log right now (will verify this and see what can be done). |
|
I'm Ok if we will just dismiss this test (already done in master). |
22be06b to
aa5247f
Compare
|
@akuzm @alexey-milovidov can you take a look? |
| function execute_group_by() | ||
| { | ||
| local opts=( | ||
| --max_memory_usage_for_user=$((150<<20)) |
There was a problem hiding this comment.
Peak memory usage for the main query (with GROUP BY) is ~100MiB (with max_threads=2 as here).
So set max_memory_usage_for_user to 150MiB and if the memory tracking accounting will be incorrect then the second query will fail
Note that we also need one running query for the user (sleep(3)), since max_memory_usage_for_user is installed to 0 once there are no more queries for user.
While rewriting the test in ClickHouse#11119 it looses LIMIT, which makes the test useless, see details in ClickHouse#11022 Signed-off-by: Azat Khuzhin <[email protected]>
* tests: fix 01281_group_by_limit_memory_tracking flakiness CI: https://s3.amazonaws.com/clickhouse-test-reports/41092/14d8f297d73f9f813c447474310fbfa0c5b18a0f/stateless_tests__debug__[2/3].html Signed-off-by: Azat Khuzhin <[email protected]> * tests: add missing bits into 01281_group_by_limit_memory_tracking While rewriting the test in #11119 it looses LIMIT, which makes the test useless, see details in #11022 Signed-off-by: Azat Khuzhin <[email protected]> Signed-off-by: Azat Khuzhin <[email protected]>
Changelog category (leave one):
Cc: @akuzm
Follow-up for: #11022