mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #54251 from ClickHouse/fix_zk_fault_injection_logging
Properly re-initialize ZooKeeper fault injection
This commit is contained in:
commit
941f0f1aef
@ -1516,7 +1516,7 @@ bool ZooKeeper::hasReachedDeadline() const
|
||||
void ZooKeeper::maybeInjectSendFault()
|
||||
{
|
||||
if (unlikely(inject_setup.test() && send_inject_fault && send_inject_fault.value()(thread_local_rng)))
|
||||
throw Exception::fromMessage(Error::ZSESSIONEXPIRED, "Session expired (fault injected on recv)");
|
||||
throw Exception::fromMessage(Error::ZSESSIONEXPIRED, "Session expired (fault injected on send)");
|
||||
}
|
||||
|
||||
void ZooKeeper::maybeInjectRecvFault()
|
||||
|
@ -2743,6 +2743,8 @@ zkutil::ZooKeeperPtr Context::getZooKeeper() const
|
||||
Stopwatch watch;
|
||||
LOG_DEBUG(shared->log, "Trying to establish a new connection with ZooKeeper");
|
||||
shared->zookeeper = shared->zookeeper->startNewSession();
|
||||
if (isServerCompletelyStarted())
|
||||
shared->zookeeper->setServerCompletelyStarted();
|
||||
LOG_DEBUG(shared->log, "Establishing a new connection with ZooKeeper took {} ms", watch.elapsedMilliseconds());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user