This is an automated email from the ASF dual-hosted git repository.
liaoxin pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new d0cf12f919b [opt](load) print more detailed log when stream load
finished #41398 (#41643)
d0cf12f919b is described below
commit d0cf12f919b1e495fc9e1dfaa570baff52ba8a20
Author: Xin Liao <[email protected]>
AuthorDate: Fri Oct 11 09:52:57 2024 +0800
[opt](load) print more detailed log when stream load finished #41398
(#41643)
cherry pick from #41398
---
be/src/http/action/stream_load.cpp | 13 +++++++++++++
be/src/runtime/stream_load/stream_load_executor.cpp | 12 ++----------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/be/src/http/action/stream_load.cpp
b/be/src/http/action/stream_load.cpp
index 3557d750ed4..5b113219192 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 75386d7aa6b..c21cbc492f6 100644
--- a/be/src/runtime/stream_load/stream_load_executor.cpp
+++ b/be/src/runtime/stream_load/stream_load_executor.cpp
@@ -82,6 +82,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;
@@ -165,6 +166,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;
@@ -227,16 +229,6 @@ Status
StreamLoadExecutor::execute_plan_fragment(std::shared_ptr<StreamLoadConte
this->commit_txn(ctx.get());
}
}
-
- LOG(INFO) << "finished to execute stream load. label=" <<
ctx->label
- << ", txn_id=" << ctx->txn_id
- << ", query_id=" <<
print_id(ctx->put_result.params.params.query_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;
});
}
if (!st.ok()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]