Fix list request

This commit is contained in:
Antonio Andelic 2022-07-11 12:13:50 +00:00
parent 41dd4e13f4
commit 197388e29c
2 changed files with 2 additions and 2 deletions

View File

@ -1086,7 +1086,6 @@ std::future<Coordination::ListResponse> 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);
};

View File

@ -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<ZooKeeperListRequest>();
}
@ -1227,6 +1227,7 @@ void ZooKeeper::list(
RequestInfo request_info;
request_info.callback = [callback](const Response & response) { callback(dynamic_cast<const ListResponse &>(response)); };
request_info.watch = watch;
request_info.request = std::move(request);
pushRequest(std::move(request_info));
ProfileEvents::increment(ProfileEvents::ZooKeeperList);