mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
fix auxiliary zookeepers
This commit is contained in:
parent
45d407034f
commit
4b11735680
@ -976,7 +976,7 @@ ZooKeeperPtr ZooKeeper::startNewSession() const
|
||||
|
||||
void ZooKeeper::initSession()
|
||||
{
|
||||
String session_path = fs::path(args.sessions_path) / toString(DB::ServerUUID::get());
|
||||
String session_path = fs::path(args.sessions_path) / args.zookeeper_name / toString(DB::ServerUUID::get());
|
||||
Coordination::Stat stat;
|
||||
if (trySet(session_path, "", -1, &stat) == Coordination::Error::ZOK)
|
||||
{
|
||||
@ -991,7 +991,7 @@ void ZooKeeper::initSession()
|
||||
|
||||
void ZooKeeper::addCheckSessionOp(Coordination::Requests & requests) const
|
||||
{
|
||||
String session_path = fs::path(args.sessions_path) / toString(DB::ServerUUID::get());
|
||||
String session_path = fs::path(args.sessions_path) / args.zookeeper_name / toString(DB::ServerUUID::get());
|
||||
requests.push_back(zkutil::makeCheckRequest(session_path, session_node_version));
|
||||
}
|
||||
|
||||
|
@ -132,6 +132,8 @@ void ZooKeeperArgs::initFromKeeperServerSection(const Poco::Util::AbstractConfig
|
||||
|
||||
void ZooKeeperArgs::initFromKeeperSection(const Poco::Util::AbstractConfiguration & config, const std::string & config_name)
|
||||
{
|
||||
zookeeper_name = config_name;
|
||||
|
||||
Poco::Util::AbstractConfiguration::Keys keys;
|
||||
config.keys(config_name, keys);
|
||||
|
||||
@ -195,7 +197,7 @@ void ZooKeeperArgs::initFromKeeperSection(const Poco::Util::AbstractConfiguratio
|
||||
}
|
||||
else if (key == "sessions_path")
|
||||
{
|
||||
chroot = config.getString(config_name + "." + key);
|
||||
sessions_path = config.getString(config_name + "." + key);
|
||||
}
|
||||
else if (key == "implementation")
|
||||
{
|
||||
|
@ -29,6 +29,7 @@ struct ZooKeeperArgs
|
||||
ZooKeeperArgs() = default;
|
||||
bool operator == (const ZooKeeperArgs &) const = default;
|
||||
|
||||
String zookeeper_name = "zookeeper";
|
||||
String implementation = "zookeeper";
|
||||
Strings hosts;
|
||||
String auth_scheme;
|
||||
|
Loading…
Reference in New Issue
Block a user