提交 f497b0c6 编写于 作者: A Alexey Milovidov

BackgroundSchedulePool: miscellaneous; added TODO [#CLICKHOUSE-2].

上级 69714f06
......@@ -150,7 +150,7 @@ namespace CreateMode
}
using EventPtr = std::shared_ptr<Poco::Event>;
using TaskHandlePtr = DB::BackgroundSchedulePool::TaskHandle;
using TaskHandlePtr = DB::BackgroundSchedulePool::TaskHandle; /// TODO Need to remove this dependency.
class ZooKeeper;
......
......@@ -273,6 +273,7 @@ int32_t ZooKeeper::getChildrenImpl(const std::string & path, Strings & res,
return code;
}
Strings ZooKeeper::getChildren(
const std::string & path, Stat * stat, const EventPtr & watch)
{
......
......@@ -1233,7 +1233,7 @@ BackgroundSchedulePool & Context::getSchedulePool()
{
auto lock = getLock();
if (!shared->schedule_pool)
shared->schedule_pool = std::make_shared<BackgroundSchedulePool>(settings.schedule_background_pool_size);
shared->schedule_pool = std::make_shared<BackgroundSchedulePool>(settings.background_schedule_pool_size);
return *shared->schedule_pool;
}
......
......@@ -77,7 +77,7 @@ struct Settings
M(SettingUInt64, background_pool_size, DBMS_DEFAULT_BACKGROUND_POOL_SIZE) \
/** Number of threads performing background tasks for replicated tables. \
* TODO: Now only applies when the server is started. You can make it dynamically variable. */ \
M(SettingUInt64, schedule_background_pool_size, DBMS_DEFAULT_BACKGROUND_POOL_SIZE) \
M(SettingUInt64, background_schedule_pool_size, DBMS_DEFAULT_BACKGROUND_POOL_SIZE) \
\
/** Sleep time for StorageDistributed DirectoryMonitors in case there is no work or exception has been thrown */ \
M(SettingMilliseconds, distributed_directory_monitor_sleep_time_ms, DBMS_DISTRIBUTED_DIRECTORY_MONITOR_SLEEP_TIME_MS) \
......
......@@ -359,7 +359,7 @@ private:
/** 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.
*/
void pullLogsToQueue(BackgroundSchedulePool::TaskHandle = nullptr);
void pullLogsToQueue(BackgroundSchedulePool::TaskHandle next_update_event = 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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册