mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 18:32:29 +00:00
fix intersecting part if session expired during queue initialization
This commit is contained in:
parent
7b5b7e4963
commit
3f9c9c9a77
@ -41,7 +41,7 @@ ReplicatedMergeTreeQueue::ReplicatedMergeTreeQueue(StorageReplicatedMergeTree &
|
|||||||
void ReplicatedMergeTreeQueue::clear()
|
void ReplicatedMergeTreeQueue::clear()
|
||||||
{
|
{
|
||||||
auto locks = lockQueue();
|
auto locks = lockQueue();
|
||||||
assert(future_parts.empty());
|
chassert(future_parts.empty());
|
||||||
current_parts.clear();
|
current_parts.clear();
|
||||||
virtual_parts.clear();
|
virtual_parts.clear();
|
||||||
queue.clear();
|
queue.clear();
|
||||||
@ -62,6 +62,7 @@ void ReplicatedMergeTreeQueue::setBrokenPartsToEnqueueFetchesOnLoading(Strings &
|
|||||||
|
|
||||||
void ReplicatedMergeTreeQueue::initialize(zkutil::ZooKeeperPtr zookeeper)
|
void ReplicatedMergeTreeQueue::initialize(zkutil::ZooKeeperPtr zookeeper)
|
||||||
{
|
{
|
||||||
|
clear();
|
||||||
std::lock_guard lock(state_mutex);
|
std::lock_guard lock(state_mutex);
|
||||||
|
|
||||||
LOG_TRACE(log, "Initializing parts in queue");
|
LOG_TRACE(log, "Initializing parts in queue");
|
||||||
|
Loading…
Reference in New Issue
Block a user