Add ability limit amount of jemalloc profile flushes on MEMORY_LIMIT_EXCEEDED per time interval#101396
Conversation
|
Workflow [PR], commit [f1f37e2] Summary: ❌
AI ReviewSummaryThis PR adds a server setting Missing context
ClickHouse Rules
Final Verdict
|
8a741e9 to
4386a95
Compare
| { | ||
| auto flushed_profile = DB::Jemalloc::flushProfile(flush_prefix); |
There was a problem hiding this comment.
flushProfile calls checkProfilingEnabled and can throw when ClickHouse is started without jemalloc profiling (opt.prof=false).
In this MEMORY_LIMIT_EXCEEDED path, that would replace the intended memory-limit exception with BAD_ARGUMENTS, which is misleading and can break callers that rely on MEMORY_LIMIT_EXCEEDED handling.
Please keep the old guard (prof.active / opt.prof) before calling flushProfile, or catch and log profiling-related exceptions here so the original memory-limit flow is preserved.
There was a problem hiding this comment.
Ok, it is better to keep it, since we do not enable jemalloc for non-Linux, I will do this separately, for now I will get the original check back.
4386a95 to
f1f37e2
Compare
LLVM Coverage Report
Changed lines: 72.41% (42/58) | lost baseline coverage: 13 line(s) · Uncovered code |
1d1c667
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add ability limit amount of jemalloc profile flushes on MEMORY_LIMIT_EXCEEDED per time interval