提交 4e5e0fa6 编写于 作者: A Alexey Milovidov

ReplicatedMergeTree: Better diagnostics [#CLICKHOUSE-2]

上级 9b3169a3
......@@ -190,7 +190,7 @@ void ReplicatedMergeTreeAlterThread::run()
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
force_recheck_parts = true;
......
......@@ -38,7 +38,7 @@ void ReplicatedMergeTreeCleanupThread::run()
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
}
storage.cleanup_thread_event.tryWait(CLEANUP_SLEEP_MS);
......
......@@ -265,7 +265,7 @@ void ReplicatedMergeTreePartCheckThread::checkPart(const String & part_name)
{
/// TODO Better to check error code.
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
LOG_ERROR(log, "Part " << part_name << " looks broken. Removing it and queueing a fetch.");
ProfileEvents::increment(ProfileEvents::ReplicatedPartChecksFailed);
......@@ -383,7 +383,7 @@ void ReplicatedMergeTreePartCheckThread::run()
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
wakeup_event.tryWait(PART_CHECK_ERROR_SLEEP_MS);
}
}
......
......@@ -93,7 +93,7 @@ void ReplicatedMergeTreeRestartingThread::run()
catch (const zkutil::KeeperException & e)
{
/// The exception when you try to zookeeper_init usually happens if DNS does not work. We will try to do it again.
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
if (first_time)
storage.startup_event.set();
......@@ -158,7 +158,7 @@ void ReplicatedMergeTreeRestartingThread::run()
catch (...)
{
storage.startup_event.set();
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
}
wakeup_event.tryWait(check_period_ms);
......@@ -179,7 +179,7 @@ void ReplicatedMergeTreeRestartingThread::run()
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
}
LOG_DEBUG(log, "Restarting thread finished");
......
......@@ -234,7 +234,7 @@ StorageReplicatedMergeTree::StorageReplicatedMergeTree(
/// Failed to connect to ZK (this became known when trying to perform the first operation).
if (e.code == ZooKeeperImpl::ZooKeeper::ZCONNECTIONLOSS)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
current_zookeeper = nullptr;
}
else
......@@ -1468,7 +1468,7 @@ bool StorageReplicatedMergeTree::executeFetch(const StorageReplicatedMergeTree::
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
}
throw;
......@@ -1606,7 +1606,7 @@ void StorageReplicatedMergeTree::queueUpdatingThread()
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
queue_updating_event->tryWait(QUEUE_UPDATE_ERROR_SLEEP_MS);
}
}
......@@ -1626,7 +1626,7 @@ bool StorageReplicatedMergeTree::queueTask()
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
}
LogEntryPtr & entry = selected.first;
......@@ -1660,7 +1660,7 @@ bool StorageReplicatedMergeTree::queueTask()
LOG_INFO(log, e.displayText());
}
else
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
/** This exception will be written to the queue element, and it can be looked up using `system.replication_queue` table.
* The thread that performs this action will sleep a few seconds after the exception.
......@@ -1670,7 +1670,7 @@ bool StorageReplicatedMergeTree::queueTask()
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
throw;
}
});
......@@ -1929,7 +1929,7 @@ void StorageReplicatedMergeTree::mergeSelectingThread()
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
tryLogCurrentException(log, __PRETTY_FUNCTION__);
}
if (shutdown_called || !is_leader_node)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册