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

fix a bug that ExchangeReceiver can't be canceled #4441

Merged
merged 10 commits into from
Mar 25, 2022
Merged

Conversation

bestwoody
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #4432

Problem Summary:

What is changed and how it works?

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 Mar 25, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • fuzhe1989
  • 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.

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 needs-cherry-pick-release-6.0 Type: Need cherry pick to release-6.0 release-note-none Denotes a PR that doesn't merit a release note. labels Mar 25, 2022
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 25, 2022
@bestwoody bestwoody requested a review from fzhedu March 25, 2022 09:28
Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 321 to 322
if (!setEndState(ExchangeReceiverState::CANCELED))
return;
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 (!setEndState(ExchangeReceiverState::CANCELED))
return;
setEndState(ExchangeReceiverState::CANCELED);

it's ok for finishing a queue twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

{
assert(new_state == ExchangeReceiverState::CANCELED || new_state == ExchangeReceiverState::CLOSED);
Copy link
Contributor

Choose a reason for hiding this comment

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

please use RUNTIME_ASSERT.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

experimental , we can updated in future

@bestwoody bestwoody requested a review from yibin87 March 25, 2022 11:01
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 25, 2022
@bestwoody
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@bestwoody: 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.

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

@bestwoody: /merge in this pull request requires 2 approval(s).

In response to this:

/merge

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.

@bestwoody bestwoody added the status/LGT2 Indicates that a PR has LGTM 2. label Mar 25, 2022
@ti-chi-bot ti-chi-bot removed the status/LGT2 Indicates that a PR has LGTM 2. label Mar 25, 2022
@bestwoody bestwoody added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 25, 2022
@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 25, 2022
@bestwoody
Copy link
Contributor Author

/rebuild

1 similar comment
@bestwoody
Copy link
Contributor Author

/rebuild

Copy link
Contributor

@fzhedu fzhedu left a comment

Choose a reason for hiding this comment

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

/LGTM

@fzhedu
Copy link
Contributor

fzhedu commented Mar 25, 2022

/merge

@ti-chi-bot
Copy link
Member

@fzhedu: 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.

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.

@bestwoody
Copy link
Contributor Author

/merge

@bestwoody
Copy link
Contributor Author

/rebuild

@bestwoody
Copy link
Contributor Author

/run-all-tests

1 similar comment
@bestwoody
Copy link
Contributor Author

/run-all-tests

@bestwoody
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@bestwoody: 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.

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.

@sre-bot
Copy link
Collaborator

sre-bot commented Mar 25, 2022

Coverage for changed files

Filename                                   Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DataStreams/TiRemoteBlockInputStream.h         115               115     0.00%          15                15     0.00%         150               150     0.00%          60                60     0.00%
Flash/Coprocessor/CoprocessorReader.h           49                49     0.00%          11                11     0.00%          80                80     0.00%          32                32     0.00%
Flash/Coprocessor/DAGContext.cpp                91                67    26.37%          25                17    32.00%         206               169    17.96%          64                54    15.62%
Flash/Coprocessor/DAGContext.h                  31                13    58.06%          24                12    50.00%          72                30    58.33%           8                 3    62.50%
Flash/Mpp/ExchangeReceiver.cpp                 308               308     0.00%          32                32     0.00%         459               459     0.00%         192               192     0.00%
Flash/Mpp/ExchangeReceiver.h                     9                 9     0.00%           7                 7     0.00%          15                15     0.00%           2                 2     0.00%
Flash/Mpp/MPPTask.cpp                          417               417     0.00%          21                21     0.00%         350               350     0.00%         190               190     0.00%
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                         1020               978     4.12%         135               115    14.81%        1332              1253     5.93%         548               533     2.74%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
17049      9575             43.84%    191774  96996        49.42%

full coverage report (for internal network access only)

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #4445.

@bestwoody bestwoody deleted the bugfix_cancel_recv branch March 25, 2022 14:59
@bestwoody bestwoody added the needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. label Mar 31, 2022
ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Mar 31, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #4532.

bestwoody added a commit to ti-chi-bot/tiflash that referenced this pull request Apr 14, 2022
bestwoody added a commit that referenced this pull request Apr 14, 2022
* This is an automated cherry-pick of #4441

Signed-off-by: ti-chi-bot <[email protected]>

* Revert "This is an automated cherry-pick of #4441"

This reverts commit 25e2a26.

* cherry pick
bestwoody added a commit that referenced this pull request Apr 14, 2022
* This is an automated cherry-pick of #4441

Signed-off-by: ti-chi-bot <[email protected]>

* Revert "This is an automated cherry-pick of #4441"

This reverts commit 25e2a26.

* cherry pick

* format

* pass code stlye check

Co-authored-by: bestwoody <[email protected]>
Co-authored-by: bestwoody <[email protected]>
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.

Ignore this, just a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.0 Type: Need cherry pick to release-6.0 release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 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.

The mvcc snapshot can't be released for a long time
7 participants