Update src/Common/MemoryTracker.cpp

Co-authored-by: alesapin <alesapin@clickhouse.com>
This commit is contained in:
Dmitry Novik 2022-02-01 16:14:48 +03:00 committed by GitHub
parent 4e612d0e1a
commit 1310a89fb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,7 +190,7 @@ void MemoryTracker::allocImpl(Int64 size, bool throw_if_memory_exceeded, MemoryT
if (unlikely(current_hard_limit && will_be > current_hard_limit) && memoryTrackerCanThrow(level, false) && throw_if_memory_exceeded)
{
bool need_to_throw = true;
bool try_to_free_momory = overcommit_tracker != nullptr && query_tracker != nullptr;
bool try_to_free_memory = overcommit_tracker != nullptr && query_tracker != nullptr;
if (try_to_free_momory)
need_to_throw = overcommit_tracker->needToStopQuery(query_tracker);