Skip to content

Test: Support coprocessor test#5957

Merged
ti-chi-bot merged 10 commits intopingcap:masterfrom
ywqdev:support_cop_test
Sep 20, 2022
Merged

Test: Support coprocessor test#5957
ti-chi-bot merged 10 commits intopingcap:masterfrom
ywqdev:support_cop_test

Conversation

@ywqzzy
Copy link
Contributor

@ywqzzy ywqzzy commented Sep 20, 2022

What problem does this PR solve?

Issue Number: ref #4609

Problem Summary:

What is changed and how it works?

Add test API to run Coprocessor.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 20, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • LittleFall
  • SeaRise

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 20, 2022
@SeaRise SeaRise self-requested a review September 20, 2022 07:00
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Sep 20, 2022

/run-all-tests

@LittleFall LittleFall self-requested a review September 20, 2022 08:04
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Sep 20, 2022

/run-all-tests

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Sep 20, 2022

Note that if we want to make the coprocessor query run indefinitely, we can change MockSourceStream.h:65 to construct an infinite TableScanStream.

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 20, 2022

Coverage for changed files

Filename                                 Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Debug/MockComputeServerManager.cpp            28                 7    75.00%          12                 2    83.33%          84                18    78.57%          18                 5    72.22%
Debug/dbgFuncCoprocessor.cpp                 441               323    26.76%          46                28    39.13%         936               617    34.08%         296               219    26.01%
Debug/dbgFuncCoprocessor.h                     1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
Flash/FlashService.cpp                       436               216    50.46%          25                 8    68.00%         364               167    54.12%         114                75    34.21%
Flash/tests/gtest_compute_server.cpp         194                56    71.13%           9                 0   100.00%         333                 0   100.00%          60                32    46.67%
Interpreters/Context.cpp                     538               299    44.42%         174                75    56.90%        1140               609    46.58%         286               203    29.02%
Interpreters/Context.h                        13                 5    61.54%          13                 5    61.54%          13                 5    61.54%           0                 0         -
Server/MockComputeClient.h                     8                 2    75.00%           3                 0   100.00%          20                 6    70.00%           4                 2    50.00%
TestUtils/ExecutorTestUtils.cpp               67                10    85.07%          20                 2    90.00%         213                37    82.63%          50                 6    88.00%
TestUtils/ExecutorTestUtils.h                  3                 1    66.67%           3                 1    66.67%          18                13    27.78%           0                 0         -
TestUtils/MPPTaskTestUtils.cpp                37                 7    81.08%          13                 2    84.62%         115                24    79.13%          18                 5    72.22%
TestUtils/MPPTaskTestUtils.h                   6                 1    83.33%           3                 0   100.00%          13                 3    76.92%           2                 1    50.00%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                       1772               927    47.69%         322               123    61.80%        3250              1499    53.88%         848               548    35.38%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18868      8083             57.16%    219608  83255        62.09%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 20, 2022
LittleFall
LittleFall previously approved these changes Sep 20, 2022
}
CATCH
} // namespace tests
} // namespace DB No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} // namespace DB
} // namespace DB


if (!security_config->checkGrpcContext(grpc_context))
// For coprocessor test, we don't care about security config.
if (!context->isCopTest() && !security_config->checkGrpcContext(grpc_context))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (!context->isCopTest() && !security_config->checkGrpcContext(grpc_context))
if (unlikely(!context->isCopTest() && !security_config->checkGrpcContext(grpc_context)))

// For MPP test, we don't care about security config.
if (!context->isMPPTest())
// For MPP or Cop test, we don't care about security config.
if (likely(!(context->isMPPTest() || context->isCopTest())))
Copy link
Contributor

Choose a reason for hiding this comment

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

can it replace to !context->isTest()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can it replace to !context->isTest()?

Yes!

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 20, 2022
@LittleFall LittleFall dismissed their stale review September 20, 2022 08:29

test this github feature

@LittleFall LittleFall added status/LGT1 Indicates that a PR has LGTM 1. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Sep 20, 2022
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 20, 2022
Copy link
Contributor

@LittleFall LittleFall left a comment

Choose a reason for hiding this comment

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

see my previous review comment, rest LGTM

@JaySon-Huang
Copy link
Contributor

@LittleFall you can use "Request change" to dismiss the LGTM counting

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Sep 20, 2022

/merge

@ti-chi-bot
Copy link
Member

@ywqzzy: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 06a5016

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 20, 2022
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Sep 20, 2022

/run-unit-tests

1 similar comment
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Sep 20, 2022

/run-unit-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 20, 2022

Coverage for changed files

Filename                                 Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Debug/MockComputeServerManager.cpp            28                 7    75.00%          12                 2    83.33%          84                18    78.57%          18                 5    72.22%
Debug/dbgFuncCoprocessor.cpp                 441               323    26.76%          46                28    39.13%         936               617    34.08%         296               219    26.01%
Debug/dbgFuncCoprocessor.h                     1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
Flash/FlashService.cpp                       434               217    50.00%          25                 8    68.00%         364               167    54.12%         112                77    31.25%
Flash/tests/gtest_compute_server.cpp         194                56    71.13%           9                 0   100.00%         333                 0   100.00%          60                32    46.67%
Interpreters/Context.cpp                     538               299    44.42%         174                75    56.90%        1140               609    46.58%         286               203    29.02%
Interpreters/Context.h                        13                 5    61.54%          13                 5    61.54%          13                 5    61.54%           0                 0         -
Server/MockComputeClient.h                     8                 2    75.00%           3                 0   100.00%          20                 6    70.00%           4                 2    50.00%
TestUtils/ExecutorTestUtils.cpp               67                10    85.07%          20                 2    90.00%         213                37    82.63%          50                 6    88.00%
TestUtils/ExecutorTestUtils.h                  3                 1    66.67%           3                 1    66.67%          18                13    27.78%           0                 0         -
TestUtils/MPPTaskTestUtils.cpp                37                 7    81.08%          13                 2    84.62%         115                24    79.13%          18                 5    72.22%
TestUtils/MPPTaskTestUtils.h                   6                 1    83.33%           3                 0   100.00%          13                 3    76.92%           2                 1    50.00%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                       1770               928    47.57%         322               123    61.80%        3250              1499    53.88%         846               550    34.99%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18868      8084             57.15%    219611  83310        62.06%

full coverage report (for internal network access only)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants