From 328359dcd3b97ace008750e7ab40002c1c051e2a Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 7 Feb 2024 18:51:19 +0100 Subject: [PATCH] Update ZooKeeperImpl.cpp --- src/Common/ZooKeeper/ZooKeeperImpl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Common/ZooKeeper/ZooKeeperImpl.cpp b/src/Common/ZooKeeper/ZooKeeperImpl.cpp index 1fbadbd7616..dcfadff536a 100644 --- a/src/Common/ZooKeeper/ZooKeeperImpl.cpp +++ b/src/Common/ZooKeeper/ZooKeeperImpl.cpp @@ -401,6 +401,9 @@ ZooKeeper::ZooKeeper( keeper_feature_flags.logFlags(log); ProfileEvents::increment(ProfileEvents::ZooKeeperInit); + + /// Avoid stale reads after connecting + sync("/", [](const SyncResponse &){}); } catch (...) {