Fix comment

This commit is contained in:
alesapin 2022-09-11 13:47:04 +02:00
parent ac53830000
commit 21ab379026
2 changed files with 5 additions and 3 deletions

View File

@ -7584,7 +7584,7 @@ std::pair<bool, NameSet> StorageReplicatedMergeTree::unlockSharedData(const IMer
return std::make_pair(true, NameSet{});
}
/// We remove parts during table shutdown. If exception happen restarting thread will be already turned
/// We remove parts during table shutdown. If exception happen, restarting thread will be already turned
/// off and nobody will reconnect our zookeeper connection. In this case we use zookeeper connection from
/// context.
zkutil::ZooKeeperPtr zookeeper;

View File

@ -363,9 +363,11 @@ private:
zkutil::ZooKeeperPtr tryGetZooKeeper() const;
zkutil::ZooKeeperPtr getZooKeeper() const;
/// Get connection from global context and reconnect if needed
/// Get connection from global context and reconnect if needed.
/// NOTE: use it only when table is shut down, in all other cases
/// use getZooKeeper() because it managed by restarting thread.
/// use getZooKeeper() because it is managed by restarting thread
/// which guarantees that we have only one connected object
/// for table.
zkutil::ZooKeeperPtr getZooKeeperIfTableShutDown() const;
zkutil::ZooKeeperPtr getZooKeeperAndAssertNotReadonly() const;
void setZooKeeper();