mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Revert "Try to fix use-after-free error in MergeTree"
This commit is contained in:
parent
f7b1263d41
commit
ca1a9b890d
@ -93,18 +93,9 @@ void StorageMergeTree::startup()
|
||||
|
||||
/// NOTE background task will also do the above cleanups periodically.
|
||||
time_after_previous_cleanup.restart();
|
||||
|
||||
auto & pool = global_context.getBackgroundPool();
|
||||
|
||||
merging_mutating_task_handle = pool.createTask([this] { return mergeMutateTask(); });
|
||||
/// Ensure that thread started only after assignment to 'merging_mutating_task_handle' is done.
|
||||
pool.startTask(merging_mutating_task_handle);
|
||||
|
||||
merging_mutating_task_handle = global_context.getBackgroundPool().addTask([this] { return mergeMutateTask(); });
|
||||
if (areBackgroundMovesNeeded())
|
||||
{
|
||||
moving_task_handle = pool.createTask([this] { return movePartsTask(); });
|
||||
pool.startTask(moving_task_handle);
|
||||
}
|
||||
moving_task_handle = global_context.getBackgroundMovePool().addTask([this] { return movePartsTask(); });
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user