dbms: fixed build [#METR-2944].

This commit is contained in:
Alexey Milovidov 2015-04-16 10:32:40 +03:00
parent e4bd9b1dec
commit dd4cef4781
2 changed files with 2 additions and 2 deletions

View File

@ -470,7 +470,7 @@ int Server::main(const std::vector<std::string> & args)
bool has_zookeeper = false; bool has_zookeeper = false;
if (config().has("zookeeper")) if (config().has("zookeeper"))
{ {
global_context->setZooKeeper(new zkutil::ZooKeeper(config(), "zookeeper")); global_context->setZooKeeper(std::make_shared<zkutil::ZooKeeper>(config(), "zookeeper"));
has_zookeeper = true; has_zookeeper = true;
} }

View File

@ -6,7 +6,7 @@ int main()
try try
{ {
zkutil::Lock l(new zkutil::ZooKeeper("localhost:2181"), "/test", "test_lock"); zkutil::Lock l(std::make_shared<zkutil::ZooKeeper>("localhost:2181"), "/test", "test_lock");
std::cout << "check " << l.check() << std::endl; std::cout << "check " << l.check() << std::endl;
std::cout << "lock tryLock() " << l.tryLock() << std::endl; std::cout << "lock tryLock() " << l.tryLock() << std::endl;
std::cout << "check " << l.check() << std::endl; std::cout << "check " << l.check() << std::endl;