mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
Use consistent names for the task variables (change from next_update_task_handle to merge_selecting_handle)
This commit is contained in:
parent
4361df913b
commit
50992843c6
@ -252,7 +252,7 @@ bool ReplicatedMergeTreeQueue::remove(zkutil::ZooKeeperPtr zookeeper, const Stri
|
||||
}
|
||||
|
||||
|
||||
bool ReplicatedMergeTreeQueue::pullLogsToQueue(zkutil::ZooKeeperPtr zookeeper, BackgroundSchedulePool::TaskHandle next_update_task_handle)
|
||||
bool ReplicatedMergeTreeQueue::pullLogsToQueue(zkutil::ZooKeeperPtr zookeeper, BackgroundSchedulePool::TaskHandle merge_selecting_handle)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(pull_logs_to_queue_mutex);
|
||||
|
||||
@ -400,10 +400,10 @@ bool ReplicatedMergeTreeQueue::pullLogsToQueue(zkutil::ZooKeeperPtr zookeeper, B
|
||||
}
|
||||
}
|
||||
|
||||
if (next_update_task_handle)
|
||||
if (merge_selecting_handle)
|
||||
{
|
||||
if (zookeeper->existsWatch(zookeeper_path + "/log/log-" + padIndex(index), nullptr, next_update_task_handle->getWatchCallback()))
|
||||
next_update_task_handle->schedule();
|
||||
if (zookeeper->existsWatch(zookeeper_path + "/log/log-" + padIndex(index), nullptr, merge_selecting_handle->getWatchCallback()))
|
||||
merge_selecting_handle->schedule();
|
||||
}
|
||||
|
||||
return dirty_entries_loaded || !log_entries.empty();
|
||||
|
@ -161,10 +161,10 @@ public:
|
||||
bool remove(zkutil::ZooKeeperPtr zookeeper, const String & part_name);
|
||||
|
||||
/** Copy the new entries from the shared log to the queue of this replica. Set the log_pointer to the appropriate value.
|
||||
* If next_update_task_handle != nullptr, will schedule this task when new entries appear in the log.
|
||||
* If merge_selecting_handle != nullptr, will schedule this task when new entries appear in the log.
|
||||
* Returns true if new entries have been.
|
||||
*/
|
||||
bool pullLogsToQueue(zkutil::ZooKeeperPtr zookeeper, BackgroundSchedulePool::TaskHandle next_update_task_handle);
|
||||
bool pullLogsToQueue(zkutil::ZooKeeperPtr zookeeper, BackgroundSchedulePool::TaskHandle merge_selecting_handle);
|
||||
|
||||
/** Remove the action from the queue with the parts covered by part_name (from ZK and from the RAM).
|
||||
* And also wait for the completion of their execution, if they are now being executed.
|
||||
|
@ -953,9 +953,9 @@ void StorageReplicatedMergeTree::checkPartAndAddToZooKeeper(
|
||||
}
|
||||
|
||||
|
||||
void StorageReplicatedMergeTree::pullLogsToQueue(BackgroundSchedulePool::TaskHandle next_update_task_handle)
|
||||
void StorageReplicatedMergeTree::pullLogsToQueue(BackgroundSchedulePool::TaskHandle merge_selecting_handle)
|
||||
{
|
||||
if (queue.pullLogsToQueue(getZooKeeper(), next_update_task_handle))
|
||||
if (queue.pullLogsToQueue(getZooKeeper(), merge_selecting_handle))
|
||||
{
|
||||
if (queue_task_handle)
|
||||
queue_task_handle->wake();
|
||||
|
@ -341,9 +341,9 @@ private:
|
||||
/// Running jobs from the queue.
|
||||
|
||||
/** Copies the new entries from the logs of all replicas to the queue of this replica.
|
||||
* If next_update_task_handle != nullptr, schedules this task when new entries appear in the log.
|
||||
* If merge_selecting_handle != nullptr, schedules this task when new entries appear in the log.
|
||||
*/
|
||||
void pullLogsToQueue(BackgroundSchedulePool::TaskHandle next_update_task_handle = nullptr);
|
||||
void pullLogsToQueue(BackgroundSchedulePool::TaskHandle merge_selecting_handle = nullptr);
|
||||
|
||||
/** Execute the action from the queue. Throws an exception if something is wrong.
|
||||
* Returns whether or not it succeeds. If it did not work, write it to the end of the queue.
|
||||
|
Loading…
Reference in New Issue
Block a user