This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 14fe95578e [enhancement](heartbeat) print a warning log for long
running heartbeat (#20559)
14fe95578e is described below
commit 14fe95578ee76a898a4def69d7faef6827772ab9
Author: Yongqiang YANG <[email protected]>
AuthorDate: Fri Jun 9 08:39:35 2023 +0800
[enhancement](heartbeat) print a warning log for long running heartbeat
(#20559)
---
be/src/agent/heartbeat_server.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/be/src/agent/heartbeat_server.cpp
b/be/src/agent/heartbeat_server.cpp
index 45ad3009f6..d353692c9d 100644
--- a/be/src/agent/heartbeat_server.cpp
+++ b/be/src/agent/heartbeat_server.cpp
@@ -64,6 +64,8 @@ void HeartbeatServer::heartbeat(THeartbeatResult&
heartbeat_result,
<< ", cluster id:" << master_info.cluster_id
<< ", counter:" << google::COUNTER << ", BE start
time: " << _be_epoch;
+ MonotonicStopWatch watch;
+ watch.start();
// do heartbeat
Status st = _heartbeat(master_info);
st.to_thrift(&heartbeat_result.status);
@@ -77,6 +79,10 @@ void HeartbeatServer::heartbeat(THeartbeatResult&
heartbeat_result,
heartbeat_result.backend_info.__set_be_start_time(_be_epoch);
heartbeat_result.backend_info.__set_be_node_role(config::be_node_role);
}
+ watch.stop();
+ if (watch.elapsed_time() > 1000L * 1000L * 1000L) {
+ LOG(WARNING) << "heartbeat consume too much time. time=" <<
watch.elapsed_time();
+ }
}
Status HeartbeatServer::_heartbeat(const TMasterInfo& master_info) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]