Commit Graph

14 Commits

Author SHA1 Message Date
Raúl Marín
948ce8db93 Revert "Merge pull request #38953 from ClickHouse/add-allocation-ptr-to-trace-log"
This reverts commit e99849d031, reversing
changes made to 7ad3ff8a9e.
2022-12-27 14:28:13 +01:00
Nikolai Kochetov
7649a3c4d7 Merge branch 'master' into add-allocation-ptr-to-trace-log 2022-12-01 12:12:23 +01:00
Azat Khuzhin
ec2e671d20 Remove ThreadStatus::untracked_memory_limit_increase
It looks useless nowadays, because operator new cannot throw
MEMORY_LIMIT_EXCEEDED today, and so any code that works on Exception is
likely safe.

Refs: #40249
Refs: #24483
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-22 13:26:18 +03:00
Nikolai Kochetov
feab1eb0a3
Update CurrentMemoryTracker.cpp 2022-08-16 18:40:06 +02:00
Nikolai Kochetov
8e4c967fc9 Try to account untracked memory (per thread) more correctly. 2022-08-16 18:09:05 +02:00
Azat Khuzhin
ded70fbd53 Fix memory accounting in case of MEMORY_LIMIT_EXCEEDED errors
In case of memory allocation had been failed, it should not be take into
account anywhere, otherwise it will report incorrect memory usage for
query and in logs.

I found this while was digging into OOM in stress tests, and saw memory
allocations that had been significantly greater the memory limit (even
with overcommit).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-16 18:08:56 +02:00
Nikolai Kochetov
8b56695073 Review fixes. 2022-07-08 14:46:11 +00:00
Nikolai Kochetov
0f231b8641 Merge branch 'master' into add-allocation-ptr-to-trace-log 2022-07-07 16:30:49 +02:00
Alexander Tokmakov
fdd2db4ace
Move check for denied allocations (#38858)
* move check for denied allocations

* remove include

* make hardening softer
2022-07-07 14:24:36 +02:00
Nikolai Kochetov
dcdf2e4527 Track allocation ptr in system.trace_log. Add aggregate function for flamegraph. 2022-07-07 11:54:41 +00:00
Alexey Milovidov
638b229e27 Remove debug headers 2021-08-05 23:50:09 +03:00
Alexey Milovidov
2df3e14559 Attempt to add memory tracking to RoaringBitmaps 2021-07-22 02:56:17 +03:00
Maksim Kita
fadead3efe MemoryTracker new no throw 2021-05-25 22:23:26 +03:00
Azat Khuzhin
a3ab429129 Split MemoryTracker header
Allocator.h is included into almost everything (via PODArray.h), so keep
only small part of MemoryTracker.h for it.
2020-12-25 23:49:22 +03:00