Skip to content

Autodiscovery dynamic clusters#76001

Merged
vdimir merged 10 commits intoClickHouse:masterfrom
ianton-ru:dynamic_clusters_autodicovery
Mar 12, 2025
Merged

Autodiscovery dynamic clusters#76001
vdimir merged 10 commits intoClickHouse:masterfrom
ianton-ru:dynamic_clusters_autodicovery

Conversation

@ianton-ru
Copy link
Contributor

@ianton-ru ianton-ru commented Feb 12, 2025

Changelog category (leave one):

  • Experimental Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

  • Added support for dynamic cluster autodiscovery. This extends the existing node autodiscovery feature. ClickHouse can now automatically detect and register new clusters under a common ZooKeeper path using <multicluster_root_path>.

Documentation entry for user-facing changes

ClickHouse has a feature to discovery nodes in cluster (see setting allow_experimental_cluster_discovery).
This PR add ability to discover new clusters.
Nodes in new clusters keep the same way to register in Keeper

<clickhouse>
    <remote_servers>
        <cluster_name>
            <discovery>
                <path>/clickhouse/discovery/cluster_name</path>

Added ability to discover all clusters in Keeper node

<clickhouse>
    <remote_servers>
        <dynamic_clusters> # Actually this name is not used, can be any
            <discovery>
                <observer />
                <multicluster_root_path>/clickhouse/discovery</multicluster_root_path>

@ianton-ru ianton-ru force-pushed the dynamic_clusters_autodicovery branch from 090ef8f to df89516 Compare February 13, 2025 12:12
@ianton-ru ianton-ru marked this pull request as ready for review February 21, 2025 12:35
@vdimir vdimir added the can be tested Allows running workflows for external contributors label Feb 21, 2025
@clickhouse-gh
Copy link
Contributor

clickhouse-gh bot commented Feb 21, 2025

Workflow [PR], commit [1428036]

@clickhouse-gh clickhouse-gh bot added the pr-experimental Experimental Feature label Feb 21, 2025
@ianton-ru ianton-ru force-pushed the dynamic_clusters_autodicovery branch from 3df8f59 to 04371dd Compare February 21, 2025 14:23
@ianton-ru ianton-ru force-pushed the dynamic_clusters_autodicovery branch from 04371dd to 03df132 Compare February 21, 2025 19:56
@ianton-ru ianton-ru force-pushed the dynamic_clusters_autodicovery branch 2 times, most recently from a32ee4c to 31ebcaa Compare February 22, 2025 11:10
@ianton-ru ianton-ru force-pushed the dynamic_clusters_autodicovery branch from 31ebcaa to 98f9943 Compare February 22, 2025 16:52
Copy link
Member

@vdimir vdimir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks good, thanks for your contribution! The main suggestion is to update the documentation and review some of the other comments.

Comment on lines -56 to -59
/*
* Holds boolean flags for fixed set of keys.
* Flags can be concurrently set from different threads, and consumer can wait for it.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider updating a comment rather than removing

/// Reads data from zookeeper and tries to update cluster.
/// Returns true on success (or no update required).
bool ClusterDiscovery::updateCluster(ClusterInfo & cluster_info)
bool ClusterDiscovery::upsertCluster(ClusterInfo & cluster_info)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also update a comment that this method can also create new cluster or remove it

Comment on lines +427 to +432
{
std::lock_guard lock(mutex);
cluster_impls.erase(name);
}
clusters_to_update->remove(name);
LOG_DEBUG(log, "Dynamic cluster '{}' removed successfully", name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we put clusters_to_update->remove(name); before cluster_impls.erase(name); would it solve issue with passing cluster_info.name to removeCluster ? If yes, are there other strong reason to order operations or not to like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it can be in any order.
I did not remove record from clusters_info map, it's possible that at some moment we get cluster without nodes, when all nodes goes off, but we need to keep watch on this node in Keeper to restore cluster when nodes come back online. name is taken from clusters_info.

String zk_root = zkutil::extractZooKeeperPath(zk_name_and_root, true);
String zk_name = zkutil::extractZooKeeperName(zk_name_and_root);
String zk_name_and_root = config.getString(cluster_config_prefix + ".path", "");
String zk_multicluster_name_and_root = config.getString(cluster_config_prefix + ".multicluster_root_path", "");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option names multicluster_root_path and path seem a bit inconsistent to me. I would expect both to be either path/multicluster_path or root_path/multicluster_root_path. Or is it that multicluster_root_path corresponds to multiple clusters, meaning we would need several <path> entries to define them? If so, probably makes sense.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And could you also update documentation https://github.com/ClickHouse/ClickHouse/blob/master/docs/en/operations/cluster-discovery.md accordingly with the new feature, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<path> contains Keeper node for specific cluster, like /clickhouse/discovery/my_cluster.
<multicluster_root_path > contains parent node, root for multiple clusters, like /clickhouse/discovery, and each child subnode contains separate cluster.
So Keeper can have nodes

/clickhouse/discovery/my_cluster
/clickhouse/discovery/my_cluster_2
/clickhouse/discovery/my_cluster_3

and all clusters my_cluster, my_cluster_2, my_cluster_3 will be discovered.

my_discovery_paths = multicluster_discovery_paths
](auto)
{
(*my_discovery_paths)[zk_root_index - 1]->need_update = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(*my_discovery_paths)[zk_root_index - 1]->need_update = true;
my_discovery_paths->at(zk_root_index - 1)->need_update = true;

@ianton-ru ianton-ru force-pushed the dynamic_clusters_autodicovery branch 2 times, most recently from b166f38 to c5e7391 Compare February 25, 2025 17:37
@ianton-ru ianton-ru force-pushed the dynamic_clusters_autodicovery branch from c5e7391 to 1428036 Compare February 25, 2025 17:50
@vdimir vdimir added this pull request to the merge queue Mar 12, 2025
Merged via the queue into ClickHouse:master with commit 45ef349 Mar 12, 2025
124 of 125 checks passed
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 12, 2025
@azat
Copy link
Member

azat commented Mar 22, 2025

@ianton-ru Hi, there is a data-race - https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=78123&sha=99e652c97c30e00334a988387f6fa21f4711bce0&name_0=PR&name_1=Integration%20tests%20%28tsan%2C%201%2F6%29

Can you please take a look?

E           Exception: Sanitizer assert found for instance ==================
E           WARNING: ThreadSanitizer: data race (pid=8)
E             Write of size 8 at 0x72300000ca70 by main thread (mutexes: write M0):
E               #0 operator delete(void*, unsigned long) <null> (clickhouse+0x8787b68) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #1 void std::__1::__libcpp_operator_delete[abi:ne190107]<void*, unsigned long>(void*, unsigned long) build_docker/./contrib/llvm-project/libcxx/include/new:274:3 (clickhouse+0x18170d9e) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #2 void std::__1::__do_deallocate_handle_size[abi:ne190107]<>(void*, unsigned long) build_docker/./contrib/llvm-project/libcxx/include/new:298:10 (clickhouse+0x18170d9e)
E               #3 std::__1::__libcpp_deallocate[abi:ne190107](void*, unsigned long, unsigned long) build_docker/./contrib/llvm-project/libcxx/include/new:311:12 (clickhouse+0x18170d9e)
E               #4 std::__1::allocator<std::__1::__shared_ptr_emplace<DB::ClusterDiscovery::MulticlusterDiscovery, std::__1::allocator<DB::ClusterDiscovery::MulticlusterDiscovery>>>::deallocate[abi:ne190107](std::__1::__shared_ptr_emplace<DB::ClusterDiscovery::MulticlusterDiscovery, std::__1::allocator<DB::ClusterDiscovery::MulticlusterDiscovery>>*, unsigned long) build_docker/./contrib/llvm-project/libcxx/include/__memory/allocator.h:132:7 (clickhouse+0x18170d9e)
E               #5 std::__1::allocator_traits<std::__1::allocator<std::__1::__shared_ptr_emplace<DB::ClusterDiscovery::MulticlusterDiscovery, std::__1::allocator<DB::ClusterDiscovery::MulticlusterDiscovery>>>>::deallocate[abi:ne190107](std::__1::allocator<std::__1::__shared_ptr_emplace<DB::ClusterDiscovery::MulticlusterDiscovery, std::__1::allocator<DB::ClusterDiscovery::MulticlusterDiscovery>>>&, std::__1::__shared_ptr_emplace<DB::ClusterDiscovery::MulticlusterDiscovery, std::__1::allocator<DB::ClusterDiscovery::MulticlusterDiscovery>>*, unsigned long) build_docker/./contrib/llvm-project/libcxx/include/__memory/allocator_traits.h:312:9 (clickhouse+0x18170d9e)
E               #6 std::__1::__shared_ptr_emplace<DB::ClusterDiscovery::MulticlusterDiscovery, std::__1::allocator<DB::ClusterDiscovery::MulticlusterDiscovery>>::__on_zero_shared_weak() build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:293:5 (clickhouse+0x18170d9e)
E               #7 std::__1::__shared_weak_count::__release_weak() build_docker/./contrib/llvm-project/libcxx/src/memory.cpp (clickhouse+0x25a67e36) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #8 std::__1::__shared_weak_count::__release_shared[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:186:7 (clickhouse+0x18170c18) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #9 std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>::~shared_ptr[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:668:17 (clickhouse+0x18170c18)
E               #10 void std::__1::__destroy_at[abi:ne190107]<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, 0>(std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>*) build_docker/./contrib/llvm-project/libcxx/include/__memory/construct_at.h:67:11 (clickhouse+0x18170c18)
E               #11 void std::__1::allocator_traits<std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>::destroy[abi:ne190107]<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, void, 0>(std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>&, std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>*) build_docker/./contrib/llvm-project/libcxx/include/__memory/allocator_traits.h:339:5 (clickhouse+0x18170c18)
E               #12 std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>::__base_destruct_at_end[abi:ne190107](std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>*) build_docker/./contrib/llvm-project/libcxx/include/vector:985:7 (clickhouse+0x18170c18)
E               #13 std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>::__clear[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/vector:979:5 (clickhouse+0x18170c18)
E               #14 std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>::__destroy_vector::operator()[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/vector:530:16 (clickhouse+0x18170c18)
E               #15 std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>::~vector[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/vector:541:67 (clickhouse+0x18170c18)
E               #16 void std::__1::__destroy_at[abi:ne190107]<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>, 0>(std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>*) build_docker/./contrib/llvm-project/libcxx/include/__memory/construct_at.h:67:11 (clickhouse+0x18170c18)
E               #17 void std::__1::allocator_traits<std::__1::allocator<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>>>::destroy[abi:ne190107]<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>, void, 0>(std::__1::allocator<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>>&, std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>*) build_docker/./contrib/llvm-project/libcxx/include/__memory/allocator_traits.h:339:5 (clickhouse+0x18170c18)
E               #18 void std::__1::__shared_ptr_emplace<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>, std::__1::allocator<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>>>::__on_zero_shared_impl[abi:ne190107]<std::__1::allocator<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>>, 0>() build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:283:5 (clickhouse+0x18170c18)
E               #19 std::__1::__shared_ptr_emplace<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>, std::__1::allocator<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>>>::__on_zero_shared() build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:286:78 (clickhouse+0x18170c18)
E               #20 std::__1::__shared_count::__release_shared[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:156:7 (clickhouse+0x1816d987) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #21 std::__1::__shared_weak_count::__release_shared[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:185:25 (clickhouse+0x1816d987)
E               #22 std::__1::shared_ptr<std::__1::vector<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>, std::__1::allocator<std::__1::shared_ptr<DB::ClusterDiscovery::MulticlusterDiscovery>>>>::~shared_ptr[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:668:17 (clickhouse+0x1816d987)
E               #23 DB::ClusterDiscovery::~ClusterDiscovery() build_docker/./src/Interpreters/ClusterDiscovery.cpp:768:1 (clickhouse+0x1816d987)
E               #24 std::__1::default_delete<DB::ClusterDiscovery>::operator()[abi:ne190107](DB::ClusterDiscovery*) const build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:80:5 (clickhouse+0x18112b23) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #25 std::__1::unique_ptr<DB::ClusterDiscovery, std::__1::default_delete<DB::ClusterDiscovery>>::reset[abi:ne190107](DB::ClusterDiscovery*) build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:292:7 (clickhouse+0x18112b23)
E               #26 DB::ContextSharedPart::shutdown() build_docker/./src/Interpreters/Context.cpp:824:35 (clickhouse+0x18112b23)
E               #27 DB::Context::shutdown() build_docker/./src/Interpreters/Context.cpp:5382:13 (clickhouse+0x180fbaa1) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #28 DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)::$_3::operator()() const build_docker/./programs/server/Server.cpp:1213:5 (clickhouse+0x10eea908) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #29 BasicScopeGuard<DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)::$_3>::invoke() build_docker/./base/base/../base/scope_guard.h:101:9 (clickhouse+0x10ec7ce1) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #30 BasicScopeGuard<DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)::$_3>::~BasicScopeGuard() build_docker/./base/base/../base/scope_guard.h:50:26 (clickhouse+0x10ec7ce1)
E               #31 DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) build_docker/./programs/server/Server.cpp:2733:1 (clickhouse+0x10ec7ce1)
E               #32 Poco::Util::Application::run() build_docker/./base/poco/Util/src/Application.cpp:315:8 (clickhouse+0x20edddbe) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #33 DB::Server::run() build_docker/./programs/server/Server.cpp:584:25 (clickhouse+0x10ea9b25) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #34 Poco::Util::ServerApplication::run(int, char**) build_docker/./base/poco/Util/src/ServerApplication.cpp:131:9 (clickhouse+0x20efb7c0) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #35 mainEntryClickHouseServer(int, char**) build_docker/./programs/server/Server.cpp:381:20 (clickhouse+0x10ea678c) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #36 main build_docker/./programs/main.cpp:295:21 (clickhouse+0x8789500) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E           
E             Previous atomic write of size 1 at 0x72300000ca70 by thread T663 (mutexes: write M1):
E               #0 void std::__1::__cxx_atomic_store[abi:ne190107]<bool>(std::__1::__cxx_atomic_base_impl<bool>*, bool, std::__1::memory_order) build_docker/./contrib/llvm-project/libcxx/include/__atomic/cxx_atomic_impl.h:304:3 (clickhouse+0x1816e68f) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #1 std::__1::__atomic_base<bool, false>::store[abi:ne190107](bool, std::__1::memory_order) build_docker/./contrib/llvm-project/libcxx/include/__atomic/atomic_base.h:51:5 (clickhouse+0x1816e68f)
E               #2 std::__1::atomic<bool>::operator=[abi:ne190107](bool) build_docker/./contrib/llvm-project/libcxx/include/__atomic/atomic.h:54:13 (clickhouse+0x1816e68f)
E               #3 _ZZN2DB16ClusterDiscovery13initialUpdateEvENK3$_0clIN12Coordination13WatchResponseEEEDaT_ build_docker/./src/Interpreters/ClusterDiscovery.cpp:483:65 (clickhouse+0x1816e68f)
E               #4 decltype(std::declval<DB::ClusterDiscovery::initialUpdate()::$_0&>()(std::declval<Coordination::WatchResponse const&>())) std::__1::__invoke[abi:ne190107]<DB::ClusterDiscovery::initialUpdate()::$_0&, Coordination::WatchResponse const&>(DB::ClusterDiscovery::initialUpdate()::$_0&, Coordination::WatchResponse const&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:149:25 (clickhouse+0x1816e68f)
E               #5 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ne190107]<DB::ClusterDiscovery::initialUpdate()::$_0&, Coordination::WatchResponse const&>(DB::ClusterDiscovery::initialUpdate()::$_0&, Coordination::WatchResponse const&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:224:5 (clickhouse+0x1816e68f)
E               #6 std::__1::__function::__default_alloc_func<DB::ClusterDiscovery::initialUpdate()::$_0, void (Coordination::WatchResponse const&)>::operator()[abi:ne190107](Coordination::WatchResponse const&) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:210:12 (clickhouse+0x1816e68f)
E               #7 void std::__1::__function::__policy_invoker<void (Coordination::WatchResponse const&)>::__call_impl[abi:ne190107]<std::__1::__function::__default_alloc_func<DB::ClusterDiscovery::initialUpdate()::$_0, void (Coordination::WatchResponse const&)>>(std::__1::__function::__policy_storage const*, Coordination::WatchResponse const&) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:610:12 (clickhouse+0x1816e68f)
E               #8 std::__1::__function::__policy_func<void (Coordination::WatchResponse const&)>::operator()[abi:ne190107](Coordination::WatchResponse const&) const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716:12 (clickhouse+0x1c8f938b) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #9 std::__1::function<void (Coordination::WatchResponse const&)>::operator()(Coordination::WatchResponse const&) const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:989:10 (clickhouse+0x1c8f938b)
E               #10 Coordination::ZooKeeper::receiveEvent()::$_0::operator()(Coordination::Response const&) const build_docker/./src/Common/ZooKeeper/ZooKeeperImpl.cpp:965:25 (clickhouse+0x1c8f938b)
E               #11 decltype(std::declval<Coordination::ZooKeeper::receiveEvent()::$_0&>()(std::declval<Coordination::Response const&>())) std::__1::__invoke[abi:ne190107]<Coordination::ZooKeeper::receiveEvent()::$_0&, Coordination::Response const&>(Coordination::ZooKeeper::receiveEvent()::$_0&, Coordination::Response const&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:149:25 (clickhouse+0x1c8f938b)
E               #12 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ne190107]<Coordination::ZooKeeper::receiveEvent()::$_0&, Coordination::Response const&>(Coordination::ZooKeeper::receiveEvent()::$_0&, Coordination::Response const&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:224:5 (clickhouse+0x1c8f938b)
E               #13 std::__1::__function::__default_alloc_func<Coordination::ZooKeeper::receiveEvent()::$_0, void (Coordination::Response const&)>::operator()[abi:ne190107](Coordination::Response const&) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:210:12 (clickhouse+0x1c8f938b)
E               #14 void std::__1::__function::__policy_invoker<void (Coordination::Response const&)>::__call_impl[abi:ne190107]<std::__1::__function::__default_alloc_func<Coordination::ZooKeeper::receiveEvent()::$_0, void (Coordination::Response const&)>>(std::__1::__function::__policy_storage const*, Coordination::Response const&) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:610:12 (clickhouse+0x1c8f938b)
E               #15 std::__1::__function::__policy_func<void (Coordination::Response const&)>::operator()[abi:ne190107](Coordination::Response const&) const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716:12 (clickhouse+0x1c8f0f14) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #16 std::__1::function<void (Coordination::Response const&)>::operator()(Coordination::Response const&) const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:989:10 (clickhouse+0x1c8f0f14)
E               #17 Coordination::ZooKeeper::receiveEvent() build_docker/./src/Common/ZooKeeper/ZooKeeperImpl.cpp:1083:9 (clickhouse+0x1c8f0f14)
E               #18 Coordination::ZooKeeper::receiveThread() build_docker/./src/Common/ZooKeeper/ZooKeeperImpl.cpp:876:17 (clickhouse+0x1c8ef8cb) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #19 Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1::operator()() const build_docker/./src/Common/ZooKeeper/ZooKeeperImpl.cpp:454:56 (clickhouse+0x1c8f9072) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #20 decltype(std::declval<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&>()()) std::__1::__invoke[abi:ne190107]<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:149:25 (clickhouse+0x1c8f9072)
E               #21 decltype(auto) std::__1::__apply_tuple_impl[abi:ne190107]<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&, std::__1::tuple<>&>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&, std::__1::tuple<>&, std::__1::__tuple_indices<...>) build_docker/./contrib/llvm-project/libcxx/include/tuple:1354:5 (clickhouse+0x1c8f9072)
E               #22 decltype(auto) std::__1::apply[abi:ne190107]<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&, std::__1::tuple<>&>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&, std::__1::tuple<>&) build_docker/./contrib/llvm-project/libcxx/include/tuple:1358:5 (clickhouse+0x1c8f9072)
E               #23 ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&&)::'lambda'()::operator()() build_docker/./src/Common/ThreadPool.h:312:13 (clickhouse+0x1c8f9072)
E               #24 decltype(std::declval<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1>()()) std::__1::__invoke[abi:ne190107]<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&&)::'lambda'()&>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:149:25 (clickhouse+0x1c8f9072)
E               #25 void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ne190107]<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&&)::'lambda'()&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:224:5 (clickhouse+0x1c8f9072)
E               #26 std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&&)::'lambda'(), void ()>::operator()[abi:ne190107]() build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:210:12 (clickhouse+0x1c8f9072)
E               #27 void std::__1::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1>(Coordination::ZooKeeper::ZooKeeper(std::__1::vector<zkutil::ShuffleHost, std::__1::allocator<zkutil::ShuffleHost>> const&, zkutil::ZooKeeperArgs const&, std::__1::shared_ptr<DB::ZooKeeperLog>)::$_1&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:610:12 (clickhouse+0x1c8f9072)
E               #28 std::__1::__function::__policy_func<void ()>::operator()[abi:ne190107]() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716:12 (clickhouse+0x10c2901f) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #29 std::__1::function<void ()>::operator()() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:989:10 (clickhouse+0x10c2901f)
E               #30 ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::worker() build_docker/./src/Common/ThreadPool.cpp:809:17 (clickhouse+0x10c2901f)
E               #31 decltype(*std::declval<ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>().*std::declval<void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)()>()()) std::__1::__invoke[abi:ne190107]<void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*, void>(void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*&&) build_docker/./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:117:25 (clickhouse+0x10c31b5b) (BuildId: efb78aa3a30c8aa931122807b3d672a6a9722d0e)
E               #32 void std::__1::__thread_execute[abi:ne190107]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>&, std::__1::__tuple_indices<2ul>) build_docker/./contrib/llvm-project/libcxx/include/__thread/thread.h:192:3 (clickhouse+0x10c31b5b)
E               #33 void* std::__1::__thread_proxy[abi:ne190107]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>>(void*) build_docker/./contrib/llvm-project/libcxx/include/__thread/thread.h:201:3 (clickhouse+0x10c31b5b)

@ianton-ru
Copy link
Contributor Author

@azat Hello Azat, I guess I made error, here is a fix - #78174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-experimental Experimental Feature pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants