mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #41296 from young-scott/fix_issuse_41096
fix issue #41096
This commit is contained in:
commit
b26cc5a1ba
@ -61,18 +61,23 @@ public:
|
|||||||
return host_fqdn_id;
|
return host_fqdn_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string getQueueDir() const
|
||||||
|
{
|
||||||
|
return queue_dir;
|
||||||
|
}
|
||||||
|
|
||||||
void startup();
|
void startup();
|
||||||
virtual void shutdown();
|
virtual void shutdown();
|
||||||
|
|
||||||
bool isCurrentlyActive() const { return initialized && !stop_flag; }
|
bool isCurrentlyActive() const { return initialized && !stop_flag; }
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
/// Returns cached ZooKeeper session (possibly expired).
|
/// Returns cached ZooKeeper session (possibly expired).
|
||||||
ZooKeeperPtr tryGetZooKeeper() const;
|
ZooKeeperPtr tryGetZooKeeper() const;
|
||||||
/// If necessary, creates a new session and caches it.
|
/// If necessary, creates a new session and caches it.
|
||||||
ZooKeeperPtr getAndSetZooKeeper();
|
ZooKeeperPtr getAndSetZooKeeper();
|
||||||
|
|
||||||
|
protected:
|
||||||
/// Iterates through queue tasks in ZooKeeper, runs execution of new tasks
|
/// Iterates through queue tasks in ZooKeeper, runs execution of new tasks
|
||||||
void scheduleTasks(bool reinitialized);
|
void scheduleTasks(bool reinitialized);
|
||||||
|
|
||||||
|
@ -205,9 +205,9 @@ static void fillStatusColumns(MutableColumns & res_columns, size_t & col,
|
|||||||
|
|
||||||
void StorageSystemDDLWorkerQueue::fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo &) const
|
void StorageSystemDDLWorkerQueue::fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo &) const
|
||||||
{
|
{
|
||||||
zkutil::ZooKeeperPtr zookeeper = context->getZooKeeper();
|
auto& ddl_worker = context->getDDLWorker();
|
||||||
fs::path ddl_zookeeper_path = context->getConfigRef().getString("distributed_ddl.path", "/clickhouse/task_queue/ddl/");
|
fs::path ddl_zookeeper_path = ddl_worker.getQueueDir();
|
||||||
|
zkutil::ZooKeeperPtr zookeeper = ddl_worker.getAndSetZooKeeper();
|
||||||
Strings ddl_task_paths = zookeeper->getChildren(ddl_zookeeper_path);
|
Strings ddl_task_paths = zookeeper->getChildren(ddl_zookeeper_path);
|
||||||
|
|
||||||
GetResponseFutures ddl_task_futures;
|
GetResponseFutures ddl_task_futures;
|
||||||
|
Loading…
Reference in New Issue
Block a user