Better logging

This commit is contained in:
alesapin 2021-05-14 11:38:53 +03:00
parent 67e4393769
commit d4c6a5a05e

View File

@ -67,12 +67,12 @@ void ReplicatedMergeTreeRestartingThread::run()
}
else
{
if (!readonly_mode_was_set)
if (storage.getZooKeeper()->expired())
{
LOG_WARNING(log, "ZooKeeper session has expired. Switching to a new session.");
setReadonly();
}
else
else if (readonly_mode_was_set)
{
LOG_WARNING(log, "Table was in readonly mode. Will try to activate it.");
}