Skip to content

Interpreter: Mock exchange executors.#4706

Merged
ti-chi-bot merged 11 commits intopingcap:masterfrom
ywqdev:mock_exchange_executors
Apr 21, 2022
Merged

Interpreter: Mock exchange executors.#4706
ti-chi-bot merged 11 commits intopingcap:masterfrom
ywqdev:mock_exchange_executors

Conversation

@ywqzzy
Copy link
Contributor

@ywqzzy ywqzzy commented Apr 19, 2022

What problem does this PR solve?

Issue Number: ref #4609

Problem Summary:
I didn't support mock exchange executors function, in order to fully supprt mock dagrequest, need to implement all of them.

What is changed and how it works?

Mock exchangeSender&Receivers.
Little refactor of Interpreter test utils in order to mock exchange executors easily.

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 Apr 19, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • SeaRise
  • yibin87

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 Apr 19, 2022
@ywqzzy ywqzzy requested a review from SeaRise April 19, 2022 10:58
@ywqzzy ywqzzy changed the title Interpreter: Mock exchange executors. [WIP]Interpreter: Mock exchange executors. Apr 19, 2022
@ti-chi-bot ti-chi-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 19, 2022

ExecutorPtr root;
DAGProperties properties;
std::unordered_map<String, std::vector<Int64>> receiver_source_task_ids_map;
Copy link
Contributor

Choose a reason for hiding this comment

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

What is its use?

@ywqzzy ywqzzy changed the title [WIP]Interpreter: Mock exchange executors. Interpreter: Mock exchange executors. Apr 20, 2022
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 20, 2022
@ywqzzy ywqzzy requested a review from yibin87 April 21, 2022 03:12
Copy link
Contributor

@yibin87 yibin87 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 21, 2022
@ywqzzy ywqzzy requested a review from SeaRise April 21, 2022 03:38
MPPInfo mpp_info(properties.start_ts, -1, -1, {}, mock_context.receiver_source_task_ids_map);
std::shared_ptr<tipb::DAGRequest> dag_request_ptr = std::make_shared<tipb::DAGRequest>();
tipb::DAGRequest & dag_request = *dag_request_ptr;
root->toTiPBExecutor(dag_request.mutable_root_executor(), properties.collator, mpp_info, mock_context.context);
Copy link
Contributor

Choose a reason for hiding this comment

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

why move this line to here?

@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 Apr 21, 2022
Copy link
Contributor

@Lloyd-Pottiger Lloyd-Pottiger left a comment

Choose a reason for hiding this comment

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

LGTM, cool!

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Apr 21, 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: b215d3f

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 21, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Apr 21, 2022

Coverage for changed files

Filename                                     Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Debug/astToExecutor.cpp                          502               247    50.80%          48                10    79.17%        1320               631    52.20%         498               263    47.19%
Debug/astToExecutor.h                             29                10    65.52%          18                 5    72.22%          44                16    63.64%          10                 6    40.00%
TestUtils/InterpreterTestUtils.cpp                32                 5    84.38%           6                 1    83.33%          75                19    74.67%          12                 4    66.67%
TestUtils/InterpreterTestUtils.h                   7                 3    57.14%           5                 2    60.00%          21                 9    57.14%           0                 0         -
TestUtils/mockExecutor.cpp                        56                13    76.79%          34                 8    76.47%         215                47    78.14%          26                 7    73.08%
TestUtils/mockExecutor.h                           5                 1    80.00%           5                 1    80.00%          14                 3    78.57%           0                 0         -
TestUtils/tests/gtest_mock_executors.cpp         232               171    26.29%          10                 0   100.00%         151                 0   100.00%          36                36     0.00%
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                            863               450    47.86%         126                27    78.57%        1840               725    60.60%         582               316    45.70%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
17142      9494             44.62%    192949  96261        50.11%

full coverage report (for internal network access only)

@ywqzzy
Copy link
Contributor Author

ywqzzy commented Apr 21, 2022

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 21, 2022
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Apr 21, 2022

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 21, 2022
@ti-chi-bot ti-chi-bot merged commit 28a97fd into pingcap:master Apr 21, 2022
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