mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
dbms: fixed memory tracking [#METR-14301].
This commit is contained in:
parent
4bc31f666c
commit
9527462193
@ -202,12 +202,12 @@ public:
|
||||
{
|
||||
if (start + length > data.size())
|
||||
throw Exception("Parameters start = "
|
||||
+ toString(start) + ", length = "
|
||||
+ toString(length) + " are out of bound in IColumnVector<T>::cut() method"
|
||||
" (data.size() = " + toString(data.size()) + ").",
|
||||
ErrorCodes::PARAMETER_OUT_OF_BOUND);
|
||||
+ toString(start) + ", length = "
|
||||
+ toString(length) + " are out of bound in IColumnVector<T>::cut() method"
|
||||
" (data.size() = " + toString(data.size()) + ").",
|
||||
ErrorCodes::PARAMETER_OUT_OF_BOUND);
|
||||
|
||||
Self * res = new Self(length);
|
||||
Self * res = new Self(length);
|
||||
memcpy(&res->getData()[0], &data[start], length * sizeof(data[0]));
|
||||
return res;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
active_threads = max_threads;
|
||||
threads.reserve(max_threads);
|
||||
for (size_t i = 0; i < max_threads; ++i)
|
||||
threads.emplace_back([=] { thread(current_memory_tracker, i); });
|
||||
threads.emplace_back(std::bind(&ParallelInputsProcessor::thread, this, current_memory_tracker, i));
|
||||
}
|
||||
|
||||
/// Попросить все источники остановиться раньше, чем они иссякнут.
|
||||
|
Loading…
Reference in New Issue
Block a user