mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Try fix strange terminate (#1329)
* Tests: External: rename --use_http => --no_http and fix * Try fix strange terminate
This commit is contained in:
parent
3a6705af0f
commit
b993667156
@ -1975,6 +1975,13 @@ void StorageReplicatedMergeTree::becomeLeader()
|
||||
if (shutdown_called)
|
||||
return;
|
||||
|
||||
if (merge_selecting_thread.joinable())
|
||||
{
|
||||
LOG_INFO(log, "Deleting old leader");
|
||||
is_leader_node = false; // exit trigger inside thread
|
||||
merge_selecting_thread.join();
|
||||
}
|
||||
|
||||
LOG_INFO(log, "Became leader");
|
||||
is_leader_node = true;
|
||||
merge_selecting_thread = std::thread(&StorageReplicatedMergeTree::mergeSelectingThread, this);
|
||||
|
Loading…
Reference in New Issue
Block a user