Use consistent names for the task variables

This commit is contained in:
Silviu Caragea 2018-03-26 22:37:47 +03:00
parent 7d6268c8a9
commit 31874ed172
4 changed files with 10 additions and 10 deletions

View File

@ -252,7 +252,7 @@ bool ReplicatedMergeTreeQueue::remove(zkutil::ZooKeeperPtr zookeeper, const Stri
}
bool ReplicatedMergeTreeQueue::pullLogsToQueue(zkutil::ZooKeeperPtr zookeeper, BackgroundSchedulePool::TaskHandle next_update_event)
bool ReplicatedMergeTreeQueue::pullLogsToQueue(zkutil::ZooKeeperPtr zookeeper, BackgroundSchedulePool::TaskHandle next_update_task_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_event)
if (next_update_task_handle)
{
if (zookeeper->exists(zookeeper_path + "/log/log-" + padIndex(index), nullptr, next_update_event->getWatchCallback()))
next_update_event->schedule();
if (zookeeper->exists(zookeeper_path + "/log/log-" + padIndex(index), nullptr, next_update_task_handle->getWatchCallback()))
next_update_task_handle->schedule();
}
return dirty_entries_loaded || !log_entries.empty();

View File

@ -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_event != nullptr, will call this event when new entries appear in the log.
* If next_update_task_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_event);
bool pullLogsToQueue(zkutil::ZooKeeperPtr zookeeper, BackgroundSchedulePool::TaskHandle next_update_task_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.

View File

@ -953,9 +953,9 @@ void StorageReplicatedMergeTree::checkPartAndAddToZooKeeper(
}
void StorageReplicatedMergeTree::pullLogsToQueue(BackgroundSchedulePool::TaskHandle next_update_event)
void StorageReplicatedMergeTree::pullLogsToQueue(BackgroundSchedulePool::TaskHandle next_update_task_handle)
{
if (queue.pullLogsToQueue(getZooKeeper(), next_update_event))
if (queue.pullLogsToQueue(getZooKeeper(), next_update_task_handle))
{
if (queue_task_handle)
queue_task_handle->wake();

View File

@ -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_event != nullptr, calls this event when new entries appear in the log.
* If next_update_task_handle != nullptr, schedules this task when new entries appear in the log.
*/
void pullLogsToQueue(BackgroundSchedulePool::TaskHandle next_update_event = nullptr);
void pullLogsToQueue(BackgroundSchedulePool::TaskHandle next_update_task_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.