github-actions[bot] commented on code in PR #45207:
URL: https://github.com/apache/doris/pull/45207#discussion_r1877826287
##########
be/src/pipeline/pipeline_task.cpp:
##########
@@ -279,25 +271,22 @@ bool PipelineTask::_is_blocked() {
_blocked_dep = op_dep->is_blocked_by(this);
if (_blocked_dep != nullptr) {
_blocked_dep->start_watcher();
- if (_wake_up_by_downstream) {
- _eos = true;
- }
return true;
}
}
return false;
}
Status PipelineTask::execute(bool* eos) {
Review Comment:
warning: function 'execute' has cognitive complexity of 69 (threshold 50)
[readability-function-cognitive-complexity]
```cpp
Status PipelineTask::execute(bool* eos) {
^
```
<details>
<summary>Additional context</summary>
**be/src/pipeline/pipeline_task.cpp:280:** +1, including nesting penalty of
0, nesting level increased to 1
```cpp
if (_eos) {
^
```
**be/src/pipeline/pipeline_task.cpp:290:** +1, including nesting penalty of
0, nesting level increased to 1
```cpp
DBUG_EXECUTE_IF("fault_inject::PipelineXTask::execute", {
^
```
**be/src/util/debug_points.h:36:** expanded from macro 'DBUG_EXECUTE_IF'
```cpp
if (UNLIKELY(config::enable_debug_points)) {
\
^
```
**be/src/pipeline/pipeline_task.cpp:290:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
DBUG_EXECUTE_IF("fault_inject::PipelineXTask::execute", {
^
```
**be/src/util/debug_points.h:38:** expanded from macro 'DBUG_EXECUTE_IF'
```cpp
if (dp) {
\
^
```
**be/src/pipeline/pipeline_task.cpp:308:** +1, including nesting penalty of
0, nesting level increased to 1
```cpp
if (_wait_to_start()) {
^
```
**be/src/pipeline/pipeline_task.cpp:313:** +1, including nesting penalty of
0, nesting level increased to 1
```cpp
if (!_opened && !_fragment_context->is_canceled()) {
^
```
**be/src/pipeline/pipeline_task.cpp:313:** +1
```cpp
if (!_opened && !_fragment_context->is_canceled()) {
^
```
**be/src/pipeline/pipeline_task.cpp:314:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(_open());
^
```
**be/src/common/status.h:632:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/pipeline_task.cpp:314:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_open());
^
```
**be/src/common/status.h:634:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/pipeline_task.cpp:317:** nesting level increased to 1
```cpp
auto set_wake_up_and_dep_ready = [&]() {
^
```
**be/src/pipeline/pipeline_task.cpp:318:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (wake_up_early()) {
^
```
**be/src/pipeline/pipeline_task.cpp:327:** +1, including nesting penalty of
0, nesting level increased to 1
```cpp
while (!_fragment_context->is_canceled()) {
^
```
**be/src/pipeline/pipeline_task.cpp:328:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (_is_blocked()) {
^
```
**be/src/pipeline/pipeline_task.cpp:335:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (_fragment_context->is_canceled()) {
^
```
**be/src/pipeline/pipeline_task.cpp:339:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (time_spent > THREAD_TIME_SLICE) {
^
```
**be/src/pipeline/pipeline_task.cpp:347:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (should_revoke_memory(_state, sink_revocable_mem_size)) {
^
```
**be/src/pipeline/pipeline_task.cpp:348:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(_sink->revoke_memory(_state));
^
```
**be/src/common/status.h:632:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/pipeline_task.cpp:348:** +4, including nesting penalty of
3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(_sink->revoke_memory(_state));
^
```
**be/src/common/status.h:634:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/pipeline_task.cpp:351:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
DBUG_EXECUTE_IF("fault_inject::PipelineXTask::executing", {
^
```
**be/src/util/debug_points.h:36:** expanded from macro 'DBUG_EXECUTE_IF'
```cpp
if (UNLIKELY(config::enable_debug_points)) {
\
^
```
**be/src/pipeline/pipeline_task.cpp:351:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
DBUG_EXECUTE_IF("fault_inject::PipelineXTask::executing", {
^
```
**be/src/util/debug_points.h:38:** expanded from macro 'DBUG_EXECUTE_IF'
```cpp
if (dp) {
\
^
```
**be/src/pipeline/pipeline_task.cpp:358:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (_dry_run || _sink->is_finished(_state)) {
^
```
**be/src/pipeline/pipeline_task.cpp:363:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (!*eos) {
^
```
**be/src/pipeline/pipeline_task.cpp:369:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
if (_block->rows() != 0 || *eos) {
^
```
**be/src/pipeline/pipeline_task.cpp:373:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
if (!status.is<ErrorCode::END_OF_FILE>()) {
^
```
**be/src/pipeline/pipeline_task.cpp:374:** +4, including nesting penalty of
3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(status);
^
```
**be/src/common/status.h:632:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/pipeline_task.cpp:374:** +5, including nesting penalty of
4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(status);
^
```
**be/src/common/status.h:634:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/pipeline_task.cpp:375:** +1, nesting level increased to 3
```cpp
} else {
^
```
**be/src/pipeline/pipeline_task.cpp:379:** +3, including nesting penalty of
2, nesting level increased to 3
```cpp
if (*eos) { // just return, the scheduler will do finish work
^
```
**be/src/pipeline/pipeline_task.cpp:380:** +4, including nesting penalty of
3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(close(status, false));
^
```
**be/src/common/status.h:632:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/pipeline_task.cpp:380:** +5, including nesting penalty of
4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(close(status, false));
^
```
**be/src/common/status.h:634:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/pipeline/pipeline_task.cpp:388:** +1, including nesting penalty of
0, nesting level increased to 1
```cpp
RETURN_IF_ERROR(get_task_queue()->push_back(this));
^
```
**be/src/common/status.h:632:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/pipeline/pipeline_task.cpp:388:** +2, including nesting penalty of
1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(get_task_queue()->push_back(this));
^
```
**be/src/common/status.h:634:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
</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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]