Skip to content

Commit

Permalink
[BugFix] When using transaction stream load, the metric 'receive_byte…
Browse files Browse the repository at this point in the history
…s' value is always less than expected.(#28945) (#28954)

When using transaction stream load, the metric 'receive_bytes' value is always less than expected

Signed-off-by: liyan <liyan.will@gmail.com>
(cherry picked from commit 00bbf99)
  • Loading branch information
lixiaoer666 authored and mergify[bot] committed Aug 10, 2023
1 parent 41f3340 commit b1f142a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions be/src/http/action/stream_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ void StreamLoadAction::on_chunk_data(HttpRequest* req) {
}
ctx->buffer->pos += remove_bytes;
ctx->receive_bytes += remove_bytes;
ctx->total_receive_bytes += remove_bytes;
}
ctx->total_received_data_cost_nanos += (MonotonicNanos() - start_read_data_time);
}
Expand Down
2 changes: 1 addition & 1 deletion be/src/runtime/stream_load/stream_load_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Status StreamLoadExecutor::execute_plan_fragment(StreamLoadContext* ctx) {
}

if (status.ok()) {
StarRocksMetrics::instance()->stream_receive_bytes_total.increment(ctx->receive_bytes);
StarRocksMetrics::instance()->stream_receive_bytes_total.increment(ctx->total_receive_bytes);
StarRocksMetrics::instance()->stream_load_rows_total.increment(ctx->number_loaded_rows);
}
} else {
Expand Down

0 comments on commit b1f142a

Please sign in to comment.