mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix memory tracking for merges and mutations (by destroying earlier)
It fixes only some tiny allocations, and so it should not affect any huge mutations/merges. And plus, this should not be a real fix, since peak_memory_usage is obtained before even destrying this objects, and destroing objects will unlikely update peak memory usage (although it is possible). v0: do this in dtors v2: do this earlier
This commit is contained in:
parent
e4b39ca99c
commit
fd38cbb0df
@ -87,6 +87,7 @@ void MergePlainMergeTreeTask::prepare()
|
||||
|
||||
write_part_log = [this] (const ExecutionStatus & execution_status)
|
||||
{
|
||||
merge_task.reset();
|
||||
storage.writePartLog(
|
||||
PartLogElement::MERGE_PARTS,
|
||||
execution_status,
|
||||
|
@ -40,6 +40,7 @@ void MutatePlainMergeTreeTask::prepare()
|
||||
|
||||
write_part_log = [this] (const ExecutionStatus & execution_status)
|
||||
{
|
||||
mutate_task.reset();
|
||||
storage.writePartLog(
|
||||
PartLogElement::MUTATE_PART,
|
||||
execution_status,
|
||||
|
@ -985,6 +985,7 @@ private:
|
||||
ctx->mutating_pipeline.reset();
|
||||
|
||||
static_pointer_cast<MergedBlockOutputStream>(ctx->out)->writeSuffixAndFinalizePart(ctx->new_data_part, ctx->need_sync);
|
||||
ctx->out.reset();
|
||||
}
|
||||
|
||||
enum class State
|
||||
|
Loading…
Reference in New Issue
Block a user