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 4633a5c49bd [chore](log) Warning log to trace send fragment #27738
4633a5c49bd is described below
commit 4633a5c49bd369b2f4fcf633e391d009aa07c442
Author: zhiqiang <[email protected]>
AuthorDate: Wed Nov 29 16:43:25 2023 +0800
[chore](log) Warning log to trace send fragment #27738
---
be/src/service/internal_service.cpp | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/be/src/service/internal_service.cpp
b/be/src/service/internal_service.cpp
index 35de12af1aa..86b75376a10 100644
--- a/be/src/service/internal_service.cpp
+++ b/be/src/service/internal_service.cpp
@@ -521,6 +521,9 @@ Status PInternalServiceImpl::_exec_plan_fragment_impl(
uint32_t len = ser_request.size();
RETURN_IF_ERROR(deserialize_thrift_msg(buf, &len, compact,
&t_request));
}
+ const auto& fragment_list = t_request.paramsList;
+ MonotonicStopWatch timer;
+ timer.start();
for (const TExecPlanFragmentParams& params : t_request.paramsList) {
if (cb) {
@@ -529,6 +532,15 @@ Status PInternalServiceImpl::_exec_plan_fragment_impl(
RETURN_IF_ERROR(_exec_env->fragment_mgr()->exec_plan_fragment(params));
}
}
+
+ timer.stop();
+ double cost_secs = static_cast<double>(timer.elapsed_time()) /
1000000000ULL;
+ if (cost_secs > 5) {
+ LOG_WARNING("Prepare {} fragments of query {} costs {} seconds, it
costs too much",
+ fragment_list.size(),
print_id(fragment_list.front().params.query_id),
+ cost_secs);
+ }
+
return Status::OK();
} else if (version == PFragmentRequestVersion::VERSION_3) {
TPipelineFragmentParamsList t_request;
@@ -538,13 +550,23 @@ Status PInternalServiceImpl::_exec_plan_fragment_impl(
RETURN_IF_ERROR(deserialize_thrift_msg(buf, &len, compact,
&t_request));
}
- for (const TPipelineFragmentParams& params : t_request.params_list) {
+ const auto& fragment_list = t_request.params_list;
+ MonotonicStopWatch timer;
+ timer.start();
+ for (const TPipelineFragmentParams& fragment : fragment_list) {
if (cb) {
-
RETURN_IF_ERROR(_exec_env->fragment_mgr()->exec_plan_fragment(params, cb));
+
RETURN_IF_ERROR(_exec_env->fragment_mgr()->exec_plan_fragment(fragment, cb));
} else {
-
RETURN_IF_ERROR(_exec_env->fragment_mgr()->exec_plan_fragment(params));
+
RETURN_IF_ERROR(_exec_env->fragment_mgr()->exec_plan_fragment(fragment));
}
}
+ timer.stop();
+ double cost_secs = static_cast<double>(timer.elapsed_time()) /
1000000000ULL;
+ if (cost_secs > 5) {
+ LOG_WARNING("Prepare {} fragments of query {} costs {} seconds, it
costs too much",
+ fragment_list.size(),
print_id(fragment_list.front().query_id), cost_secs);
+ }
+
return Status::OK();
} else {
return Status::InternalError("invalid version");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]