From 197388e29cfddef074a6aa106eecd465ff163bcc Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 11 Jul 2022 12:13:50 +0000 Subject: [PATCH] Fix list request --- src/Common/ZooKeeper/ZooKeeper.cpp | 1 - src/Common/ZooKeeper/ZooKeeperImpl.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/ZooKeeper/ZooKeeper.cpp b/src/Common/ZooKeeper/ZooKeeper.cpp index fd14802c6fa..dc4e309cdfa 100644 --- a/src/Common/ZooKeeper/ZooKeeper.cpp +++ b/src/Common/ZooKeeper/ZooKeeper.cpp @@ -1086,7 +1086,6 @@ std::future ZooKeeper::asyncTryGetChildrenNoThrow( auto callback = [promise](const Coordination::ListResponse & response) mutable { - LOG_INFO(&Poco::Logger::get("LOGGER"), "Got response {}", response.names.size()); promise->set_value(response); }; diff --git a/src/Common/ZooKeeper/ZooKeeperImpl.cpp b/src/Common/ZooKeeper/ZooKeeperImpl.cpp index 76ec4e28613..f4fbbea82f1 100644 --- a/src/Common/ZooKeeper/ZooKeeperImpl.cpp +++ b/src/Common/ZooKeeper/ZooKeeperImpl.cpp @@ -1211,7 +1211,7 @@ void ZooKeeper::list( if (keeper_api_version < Coordination::KeeperApiVersion::V1) { if (list_request_type != ListRequestType::ALL) - throw Exception("Filtered list request type cannot be used because it's not support by the server", Error::ZBADARGUMENTS); + throw Exception("Filtered list request type cannot be used because it's not supported by the server", Error::ZBADARGUMENTS); request = std::make_shared(); } @@ -1227,6 +1227,7 @@ void ZooKeeper::list( RequestInfo request_info; request_info.callback = [callback](const Response & response) { callback(dynamic_cast(response)); }; request_info.watch = watch; + request_info.request = std::move(request); pushRequest(std::move(request_info)); ProfileEvents::increment(ProfileEvents::ZooKeeperList);