mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-12 02:23:14 +00:00
Merge
This commit is contained in:
commit
33825e4de6
@ -2,13 +2,13 @@
|
||||
|
||||
#include <zkutil/ZooKeeper.h>
|
||||
|
||||
namespace zkutil
|
||||
namespace zkutil
|
||||
{
|
||||
|
||||
class Increment
|
||||
{
|
||||
public:
|
||||
Increment(ZooKeeperPtr zk_, const std::string & path_)
|
||||
Increment(ZooKeeperPtr zk_, const std::string & path_)
|
||||
: zk(zk_), path(path_)
|
||||
{
|
||||
zk->createAncestors(path);
|
||||
@ -34,8 +34,8 @@ public:
|
||||
{
|
||||
success = zk->tryCreate(path, std::to_string(result), zkutil::CreateMode::Persistent) == ZOK;
|
||||
}
|
||||
}
|
||||
while(!success);
|
||||
}
|
||||
while (!success);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -45,4 +45,4 @@ private:
|
||||
Logger * log = &Logger::get("zkutil::Increment");
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user