File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -7645,7 +7645,15 @@ void StorageReplicatedMergeTree::createTableSharedID() const
76457645 return ;
76467646 }
76477647
7648- auto zookeeper = getZooKeeper ();
7648+ // / We may call getTableSharedID when table is shut down. If exception happen, restarting thread will be already turned
7649+ // / off and nobody will reconnect our zookeeper connection. In this case we use zookeeper connection from
7650+ // / context.
7651+ ZooKeeperPtr zookeeper;
7652+ if (shutdown_called.load ())
7653+ zookeeper = getZooKeeperIfTableShutDown ();
7654+ else
7655+ zookeeper = getZooKeeper ();
7656+
76497657 String zookeeper_table_id_path = fs::path (zookeeper_path) / " table_shared_id" ;
76507658 String id;
76517659 if (!zookeeper->tryGet (zookeeper_table_id_path, id))
You can’t perform that action at this time.
0 commit comments