Merge pull request #59854 from ClickHouse/system_zk_init

Do not reinitialize ZooKeeperWithFaultInjection on each chunk
This commit is contained in:
Alexander Gololobov 2024-02-12 10:14:54 +01:00 committed by GitHub
commit 67bb3994ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -220,6 +220,7 @@ private:
const UInt64 max_block_size;
Paths paths;
ContextPtr context;
ZooKeeperWithFaultInjection::Ptr zookeeper;
bool started = false;
};
@ -484,7 +485,6 @@ Chunk SystemZooKeeperSource::generate()
settings.insert_keeper_retry_initial_backoff_ms,
settings.insert_keeper_retry_max_backoff_ms);
ZooKeeperWithFaultInjection::Ptr zookeeper;
/// Handles reconnects when needed
auto get_zookeeper = [&] ()
{