mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 20:12:02 +00:00
Fix list request
This commit is contained in:
parent
41dd4e13f4
commit
197388e29c
@ -1086,7 +1086,6 @@ std::future<Coordination::ListResponse> ZooKeeper::asyncTryGetChildrenNoThrow(
|
|||||||
|
|
||||||
auto callback = [promise](const Coordination::ListResponse & response) mutable
|
auto callback = [promise](const Coordination::ListResponse & response) mutable
|
||||||
{
|
{
|
||||||
LOG_INFO(&Poco::Logger::get("LOGGER"), "Got response {}", response.names.size());
|
|
||||||
promise->set_value(response);
|
promise->set_value(response);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1211,7 +1211,7 @@ void ZooKeeper::list(
|
|||||||
if (keeper_api_version < Coordination::KeeperApiVersion::V1)
|
if (keeper_api_version < Coordination::KeeperApiVersion::V1)
|
||||||
{
|
{
|
||||||
if (list_request_type != ListRequestType::ALL)
|
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>();
|
request = std::make_shared<ZooKeeperListRequest>();
|
||||||
}
|
}
|
||||||
@ -1227,6 +1227,7 @@ void ZooKeeper::list(
|
|||||||
RequestInfo request_info;
|
RequestInfo request_info;
|
||||||
request_info.callback = [callback](const Response & response) { callback(dynamic_cast<const ListResponse &>(response)); };
|
request_info.callback = [callback](const Response & response) { callback(dynamic_cast<const ListResponse &>(response)); };
|
||||||
request_info.watch = watch;
|
request_info.watch = watch;
|
||||||
|
request_info.request = std::move(request);
|
||||||
|
|
||||||
pushRequest(std::move(request_info));
|
pushRequest(std::move(request_info));
|
||||||
ProfileEvents::increment(ProfileEvents::ZooKeeperList);
|
ProfileEvents::increment(ProfileEvents::ZooKeeperList);
|
||||||
|
Loading…
Reference in New Issue
Block a user