v.23.11Improvement

Fixed Memory Accounting for Threads in Queries

Fixed accounting of memory allocated before attaching a thread to a query or a user. #56089 (Nikita Taranov).
Fixed memory accounting for memory allocated before attaching a thread to a query or user.

Why it matters

This fix addresses incorrect memory tracking in ClickHouse when a thread allocates memory prior to being attached to a query or user context. Accurate memory accounting is crucial for monitoring, limiting, and debugging resource usage, ensuring system stability and reliable resource management.

How to use it

This fix is applied internally and requires no action from users. Users should update to the version of ClickHouse that includes this fix to benefit from accurate memory usage reporting.