You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/10/10 09:47:55 UTC
(doris) branch branch-2.1 updated: [opt](load) print more detailed log when stream load finished #41398 (#41639)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 30492a2438c [opt](load) print more detailed log when stream load finished #41398 (#41639)
30492a2438c is described below
commit 30492a2438cee8a7e82740fa6c6f42f2683ddc21
Author: Xin Liao <li...@126.com>
AuthorDate: Thu Oct 10 17:47:48 2024 +0800
[opt](load) print more detailed log when stream load finished #41398 (#41639)
cherry pick from #41398
---
be/src/http/action/stream_load.cpp | 13 +++++++++++++
be/src/runtime/stream_load/stream_load_executor.cpp | 8 +-------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/be/src/http/action/stream_load.cpp b/be/src/http/action/stream_load.cpp
index bcc55ae4bfd..e472c006260 100644
--- a/be/src/http/action/stream_load.cpp
+++ b/be/src/http/action/stream_load.cpp
@@ -133,6 +133,19 @@ void StreamLoadAction::handle(HttpRequest* req) {
_save_stream_load_record(ctx, str);
}
#endif
+
+ LOG(INFO) << "finished to execute stream load. label=" << ctx->label
+ << ", txn_id=" << ctx->txn_id << ", query_id=" << ctx->id
+ << ", load_cost_ms=" << ctx->load_cost_millis << ", receive_data_cost_ms="
+ << (ctx->receive_and_read_data_cost_nanos - ctx->read_data_cost_nanos) / 1000000
+ << ", read_data_cost_ms=" << ctx->read_data_cost_nanos / 1000000
+ << ", write_data_cost_ms=" << ctx->write_data_cost_nanos / 1000000
+ << ", commit_and_publish_txn_cost_ms="
+ << ctx->commit_and_publish_txn_cost_nanos / 1000000
+ << ", number_total_rows=" << ctx->number_total_rows
+ << ", number_loaded_rows=" << ctx->number_loaded_rows
+ << ", receive_bytes=" << ctx->receive_bytes << ", loaded_bytes=" << ctx->loaded_bytes;
+
// update statistics
streaming_load_requests_total->increment(1);
streaming_load_duration_ms->increment(ctx->load_cost_millis);
diff --git a/be/src/runtime/stream_load/stream_load_executor.cpp b/be/src/runtime/stream_load/stream_load_executor.cpp
index 0616c6474aa..537433a3b47 100644
--- a/be/src/runtime/stream_load/stream_load_executor.cpp
+++ b/be/src/runtime/stream_load/stream_load_executor.cpp
@@ -83,6 +83,7 @@ Status StreamLoadExecutor::execute_plan_fragment(std::shared_ptr<StreamLoadConte
ctx->number_loaded_rows = state->num_rows_load_success();
ctx->number_filtered_rows = state->num_rows_load_filtered();
ctx->number_unselected_rows = state->num_rows_load_unselected();
+ ctx->loaded_bytes = state->num_bytes_load_total();
int64_t num_selected_rows = ctx->number_total_rows - ctx->number_unselected_rows;
if (!ctx->group_commit && num_selected_rows > 0 &&
(double)ctx->number_filtered_rows / num_selected_rows > ctx->max_filter_ratio) {
@@ -133,13 +134,6 @@ Status StreamLoadExecutor::execute_plan_fragment(std::shared_ptr<StreamLoadConte
static_cast<void>(this->commit_txn(ctx.get()));
}
}
-
- LOG(INFO) << "finished to execute stream load. label=" << ctx->label
- << ", txn_id=" << ctx->txn_id << ", query_id=" << ctx->id
- << ", receive_data_cost_ms="
- << (ctx->receive_and_read_data_cost_nanos - ctx->read_data_cost_nanos) / 1000000
- << ", read_data_cost_ms=" << ctx->read_data_cost_nanos / 1000000
- << ", write_data_cost_ms=" << ctx->write_data_cost_nanos / 1000000;
};
// Reset thread memory tracker, otherwise SCOPED_ATTACH_TASK will be called nested, nesting is
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org