Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[only test] #44427

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

Mryange
Copy link
Contributor

@Mryange Mryange commented Nov 21, 2024

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -211,8 +208,6 @@ Status ExchangeSinkBuffer::add_block(BroadcastTransmitInfo&& request) {
Status ExchangeSinkBuffer::_send_rpc(InstanceLoId id) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function '_send_rpc' has cognitive complexity of 71 (threshold 50) [readability-function-cognitive-complexity]

Status ExchangeSinkBuffer::_send_rpc(InstanceLoId id) {
                           ^
Additional context

be/src/pipeline/exec/exchange_sink_buffer.cpp:214: +1, including nesting penalty of 0, nesting level increased to 1

    if (_is_finishing) {
    ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:218: +1, including nesting penalty of 0, nesting level increased to 1

    if (_instance_to_receiver_eof[id]) {
    ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:222: +1, including nesting penalty of 0, nesting level increased to 1

    if (!q.empty()) {
    ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:230: +2, including nesting penalty of 1, nesting level increased to 2

        if (request.block && !request.block->column_metas().empty()) {
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:230: +1

        if (request.block && !request.block->column_metas().empty()) {
                          ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:233: +2, including nesting penalty of 1, nesting level increased to 2

        if (!request.exec_status.ok()) {
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:239: +2, including nesting penalty of 1, nesting level increased to 2

        if (config::execution_ignore_eovercrowded) {
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:242: nesting level increased to 2

        send_callback->addFailedHandler([&, weak_task_ctx = weak_task_exec_ctx()](
                                        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:245: +3, including nesting penalty of 2, nesting level increased to 3

            if (task_lock == nullptr) {
            ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:254: nesting level increased to 2

        send_callback->addSuccessHandler([&, weak_task_ctx = weak_task_exec_ctx()](
                                         ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:259: +3, including nesting penalty of 2, nesting level increased to 3

            if (task_lock == nullptr) {
            ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:270: +3, including nesting penalty of 2, nesting level increased to 3

            if (s.is<ErrorCode::END_OF_FILE>()) {
            ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:272: +1, nesting level increased to 3

            } else if (!s.ok()) {
                   ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:276: +1, nesting level increased to 3

            } else if (eos) {
                   ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:281: +3, including nesting penalty of 2, nesting level increased to 3

                if (!s) {
                ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:292: +2, including nesting penalty of 1, nesting level increased to 2

            if (enable_http_send_block(*brpc_request)) {
            ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:293: +3, including nesting penalty of 2, nesting level increased to 3

                RETURN_IF_ERROR(transmit_block_httpv2(_context->exec_env(),
                ^

be/src/common/status.h:632: expanded from macro 'RETURN_IF_ERROR'

    do {                                \
    ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:293: +4, including nesting penalty of 3, nesting level increased to 4

                RETURN_IF_ERROR(transmit_block_httpv2(_context->exec_env(),
                ^

be/src/common/status.h:634: expanded from macro 'RETURN_IF_ERROR'

        if (UNLIKELY(!_status_.ok())) { \
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:296: +1, nesting level increased to 2

            } else {
              ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:301: +2, including nesting penalty of 1, nesting level increased to 2

        if (request.block) {
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:308: +2, including nesting penalty of 1, nesting level increased to 2

        if (_total_queue_size <= _queue_capacity) {
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:313: +1, nesting level increased to 1

    } else if (!broadcast_q.empty()) {
           ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:321: +2, including nesting penalty of 1, nesting level increased to 2

        if (request.block_holder->get_block() &&
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:321: +1

        if (request.block_holder->get_block() &&
                                              ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:327: +2, including nesting penalty of 1, nesting level increased to 2

        if (config::execution_ignore_eovercrowded) {
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:330: nesting level increased to 2

        send_callback->addFailedHandler([&, weak_task_ctx = weak_task_exec_ctx()](
                                        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:333: +3, including nesting penalty of 2, nesting level increased to 3

            if (task_lock == nullptr) {
            ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:342: nesting level increased to 2

        send_callback->addSuccessHandler([&, weak_task_ctx = weak_task_exec_ctx()](
                                         ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:347: +3, including nesting penalty of 2, nesting level increased to 3

            if (task_lock == nullptr) {
            ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:358: +3, including nesting penalty of 2, nesting level increased to 3

            if (s.is<ErrorCode::END_OF_FILE>()) {
            ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:360: +1, nesting level increased to 3

            } else if (!s.ok()) {
                   ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:364: +1, nesting level increased to 3

            } else if (eos) {
                   ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:369: +3, including nesting penalty of 2, nesting level increased to 3

                if (!s) {
                ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:380: +2, including nesting penalty of 1, nesting level increased to 2

            if (enable_http_send_block(*brpc_request)) {
            ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:381: +3, including nesting penalty of 2, nesting level increased to 3

                RETURN_IF_ERROR(transmit_block_httpv2(_context->exec_env(),
                ^

be/src/common/status.h:632: expanded from macro 'RETURN_IF_ERROR'

    do {                                \
    ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:381: +4, including nesting penalty of 3, nesting level increased to 4

                RETURN_IF_ERROR(transmit_block_httpv2(_context->exec_env(),
                ^

be/src/common/status.h:634: expanded from macro 'RETURN_IF_ERROR'

        if (UNLIKELY(!_status_.ok())) { \
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:384: +1, nesting level increased to 2

            } else {
              ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:389: +2, including nesting penalty of 1, nesting level increased to 2

        if (request.block_holder->get_block()) {
        ^

be/src/pipeline/exec/exchange_sink_buffer.cpp:393: +1, nesting level increased to 1

    } else {
      ^

@@ -18,6 +18,7 @@
#pragma once

#include <gen_cpp/Types_types.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'gen_cpp/Types_types.h' file not found [clang-diagnostic-error]

#include <gen_cpp/Types_types.h>
         ^

@Mryange
Copy link
Contributor Author

Mryange commented Nov 21, 2024

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 41714 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 239bebbe2b29e9f59b4db528f8cd318762baae70, data reload: false

------ Round 1 ----------------------------------
q1	17609	7499	7284	7284
q2	2050	188	176	176
q3	10527	1176	1186	1176
q4	10232	761	684	684
q5	7715	2925	2861	2861
q6	241	157	148	148
q7	995	635	628	628
q8	9243	1903	1966	1903
q9	7190	6908	6929	6908
q10	7044	2351	2396	2351
q11	479	281	272	272
q12	410	219	218	218
q13	17751	3412	3379	3379
q14	277	252	243	243
q15	959	913	915	913
q16	663	616	594	594
q17	990	575	565	565
q18	7548	6800	6796	6796
q19	1343	1092	963	963
q20	489	191	184	184
q21	4101	3201	3104	3104
q22	429	364	366	364
Total cold run time: 108285 ms
Total hot run time: 41714 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7292	7278	7288	7278
q2	330	233	240	233
q3	3184	3054	3032	3032
q4	2102	1866	1889	1866
q5	5883	5864	5782	5782
q6	223	145	143	143
q7	2275	1851	1840	1840
q8	3398	3586	3610	3586
q9	9523	9550	9616	9550
q10	3686	3628	3654	3628
q11	604	512	511	511
q12	841	651	662	651
q13	10528	3628	3541	3541
q14	345	319	299	299
q15	968	919	922	919
q16	702	659	663	659
q17	1858	1638	1653	1638
q18	8538	7608	7539	7539
q19	1693	1653	1572	1572
q20	2603	2368	2374	2368
q21	5383	5303	5123	5123
q22	929	856	834	834
Total cold run time: 72888 ms
Total hot run time: 62592 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.03% (9903/26041)
Line Coverage: 29.22% (82869/283611)
Region Coverage: 28.34% (42547/150111)
Branch Coverage: 24.90% (21570/86622)
Coverage Report: http://coverage.selectdb-in.cc/coverage/239bebbe2b29e9f59b4db528f8cd318762baae70_239bebbe2b29e9f59b4db528f8cd318762baae70/report/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants