This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-4.0-preview in repository https://gitbox.apache.org/repos/asf/doris.git
commit df55669e17f8e7dd2c8231f6bbf8371c099c40e2 Author: HHoflittlefish777 <[email protected]> AuthorDate: Sat Apr 20 01:27:37 2024 +0800 [fix](stream-load) fix stream load and http stream metric error #33899 --- be/src/http/action/http_stream.cpp | 3 +-- be/src/http/action/stream_load.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/be/src/http/action/http_stream.cpp b/be/src/http/action/http_stream.cpp index c46198ad92d..2a6721f9a3a 100644 --- a/be/src/http/action/http_stream.cpp +++ b/be/src/http/action/http_stream.cpp @@ -127,7 +127,6 @@ void HttpStreamAction::handle(HttpRequest* req) { // update statistics http_stream_requests_total->increment(1); http_stream_duration_ms->increment(ctx->load_cost_millis); - http_stream_current_processing->increment(-1); } Status HttpStreamAction::_handle(HttpRequest* http_req, std::shared_ptr<StreamLoadContext> ctx) { @@ -184,7 +183,6 @@ int HttpStreamAction::on_header(HttpRequest* req) { // add new line at end str = str + '\n'; HttpChannel::send_reply(req, str); - http_stream_current_processing->increment(-1); if (config::enable_stream_load_record) { str = ctx->prepare_stream_load_record(str); _save_stream_load_record(ctx, str); @@ -288,6 +286,7 @@ void HttpStreamAction::free_handler_ctx(std::shared_ptr<void> param) { } // remove stream load context from stream load manager and the resource will be released ctx->exec_env()->new_load_stream_mgr()->remove(ctx->id); + http_stream_current_processing->increment(-1); } Status HttpStreamAction::process_put(HttpRequest* http_req, diff --git a/be/src/http/action/stream_load.cpp b/be/src/http/action/stream_load.cpp index 62c1f3ddf0e..a055845ae97 100644 --- a/be/src/http/action/stream_load.cpp +++ b/be/src/http/action/stream_load.cpp @@ -139,7 +139,6 @@ void StreamLoadAction::handle(HttpRequest* req) { // update statistics streaming_load_requests_total->increment(1); streaming_load_duration_ms->increment(ctx->load_cost_millis); - streaming_load_current_processing->increment(-1); } Status StreamLoadAction::_handle(std::shared_ptr<StreamLoadContext> ctx) { @@ -217,7 +216,6 @@ int StreamLoadAction::on_header(HttpRequest* req) { // add new line at end str = str + '\n'; HttpChannel::send_reply(req, str); - streaming_load_current_processing->increment(-1); #ifndef BE_TEST if (config::enable_stream_load_record && !config::is_cloud_mode()) { str = ctx->prepare_stream_load_record(str); @@ -377,6 +375,7 @@ void StreamLoadAction::free_handler_ctx(std::shared_ptr<void> param) { } // remove stream load context from stream load manager and the resource will be released ctx->exec_env()->new_load_stream_mgr()->remove(ctx->id); + streaming_load_current_processing->increment(-1); } Status StreamLoadAction::_process_put(HttpRequest* http_req, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
