github-actions[bot] commented on code in PR #43623:
URL: https://github.com/apache/doris/pull/43623#discussion_r1837578683


##########
be/src/pipeline/pipeline_fragment_context.cpp:
##########
@@ -1890,5 +1889,249 @@ 
PipelineFragmentContext::collect_realtime_load_channel_profile() const {
     
_runtime_state->load_channel_profile()->to_thrift(load_channel_profile.get());
     return load_channel_profile;
 }
+
+StatusReporter::StatusReporter(const BaseReportStatusRequest&& request)
+        : _thread_pool(request.global_thread_pool),
+          _exec_env(request.exec_env),
+          _query_id(request.query_id),
+          _fragment_id(request.fragment_id) {}
+
+Status StatusReporter::report(const ReportStatusRequest request) {
+    return _thread_pool->submit_func([this, request]() {
+        DCHECK(_context != nullptr) << print_id(_query_id);
+        SCOPED_ATTACH_TASK(_context->get_query_ctx()->query_mem_tracker);
+        _do_report(request);
+        if (!request.done) {
+            _context->refresh_next_report_time();
+        }
+    });
+}
+
+// There can only be one of these callbacks in-flight at any moment, because
+// it is only invoked from the executor's reporting thread.
+// Also, the reported status will always reflect the most recent execution 
status,
+// including the final status when execution finishes.
+void StatusReporter::_do_report(const ReportStatusRequest& req) {

Review Comment:
   warning: function '_do_report' exceeds recommended size/complexity 
thresholds [readability-function-size]
   ```cpp
   void StatusReporter::_do_report(const ReportStatusRequest& req) {
                        ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/pipeline/pipeline_fragment_context.cpp:1913:** 221 lines including 
whitespace and comments (threshold 80)
   ```cpp
   void StatusReporter::_do_report(const ReportStatusRequest& req) {
                        ^
   ```
   
   </details>
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to