Skip to content

Commit 9a89ee8

Browse files
Merge pull request #7264 from ClickHouse/disable-memory-tracker-for-stack-trace
Disable memory tracker for exception stack.
2 parents a15d8f3 + 0ce86e1 commit 9a89ee8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

dbms/src/Interpreters/executeQuery.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ static void logQuery(const String & query, const Context & context, bool interna
120120
/// Call this inside catch block.
121121
static void setExceptionStackTrace(QueryLogElement & elem)
122122
{
123+
/// Disable memory tracker for stack trace.
124+
/// Because if exception is "Memory limit (for query) exceed", then we probably can't allocate another one string.
125+
auto temporarily_disable_memory_tracker = getCurrentMemoryTrackerActionLock();
126+
123127
try
124128
{
125129
throw;

0 commit comments

Comments
 (0)