v.20.11Improvement
Fix memory profiler settings and query_id for HTTP queries in ClickHouse
Fixmemory_profiler_step/max_untracked_memoryfor queries via HTTP (test included). Fix the issue that adjusting this value globally in xml config does not help either, since those settings are not applied anyway, only default (4MB) value is used. Fixquery_idfor the most root ThreadStatus of the http query (by initializing QueryScope after reading query_id). #16101 (Azat Khuzhin).
Why it matters
Addresses an issue where configuringmemory_profiler_step and max_untracked_memory globally in the XML config had no effect on HTTP queries because default values were always used instead. Also fixes the query_id initialization for the root ThreadStatus to reflect the actual HTTP query ID. These fixes enhance memory profiling accuracy and query identification when using HTTP protocol.How to use it
Set thememory_profiler_step and max_untracked_memory parameters either globally in the XML configuration or per query, and run queries via HTTP as usual. The fixes ensure these settings are respected without additional user action. The query_id will now correctly reflect the HTTP query's ID automatically.