From 4f86ec9d587c5d6b58491012d5c6957ab298f553 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Mon, 23 Oct 2017 17:39:29 +0300 Subject: [PATCH] Update ZooKeeper.cpp --- dbms/src/Common/ZooKeeper/ZooKeeper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Common/ZooKeeper/ZooKeeper.cpp b/dbms/src/Common/ZooKeeper/ZooKeeper.cpp index 9b8b0866928..82491e19bc0 100644 --- a/dbms/src/Common/ZooKeeper/ZooKeeper.cpp +++ b/dbms/src/Common/ZooKeeper/ZooKeeper.cpp @@ -455,7 +455,7 @@ bool ZooKeeper::existsWatch(const std::string & path, Stat * stat_, const WatchC int32_t ZooKeeper::getImpl(const std::string & path, std::string & res, Stat * stat_, WatchCallback watch_callback) { std::vector buffer; - buffer.reserve(MAX_NODE_SIZE); + buffer.resize(MAX_NODE_SIZE); int buffer_len = MAX_NODE_SIZE; int32_t code;