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 ut caused by quick closed connection #6694

Merged
merged 10 commits into from
Feb 2, 2023

Conversation

xzhangxian1008
Copy link
Contributor

@xzhangxian1008 xzhangxian1008 commented Jan 30, 2023

What problem does this PR solve?

Issue Number: close #6686

Problem Summary:

Some connections may be closed quickly when ExchangeReceiver is still creating other connections. And quick closed connection may finish MPMCQueue before other connections start to run which causes the ut fail.

For example:
Background: conn_1 and conn_2 need to be created by recv_0.
step 1: recv_0 creates conn_1, conn_1 add the live_connection to 1.
step 2: conn_1's task has been done and call the connectionDone(). Here, live_connection is set to 0 and recv_0 finished all MPMCQueue
step 3: recv_0 creates conn_2
step 4: conn_2 runs, push data and encounter errors.

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 Jan 30, 2023

[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.

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 do-not-merge/needs-triage-completed 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. labels Jan 30, 2023
@xzhangxian1008
Copy link
Contributor Author

/cc @SeaRise @windtalker

@xzhangxian1008 xzhangxian1008 changed the title Fix ut caused by quickly closed connection Fix ut caused by quick closed connection Jan 30, 2023
@xzhangxian1008
Copy link
Contributor Author

/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 Jan 30, 2023
@xzhangxian1008
Copy link
Contributor Author

/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 Jan 30, 2023
@xzhangxian1008
Copy link
Contributor Author

/run-all-tests

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 status/LGT1 Indicates that a PR has LGTM 1. and removed do-not-merge/needs-triage-completed labels Jan 31, 2023
@xzhangxian1008 xzhangxian1008 requested review from yibin87 and SeaRise and removed request for windtalker, SeaRise and yibin87 February 1, 2023 02:32
@xzhangxian1008
Copy link
Contributor Author

/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 Feb 1, 2023
dbms/src/Flash/Mpp/ExchangeReceiver.h Outdated Show resolved Hide resolved
dbms/src/Flash/Mpp/ExchangeReceiver.cpp Outdated Show resolved Hide resolved
dbms/src/Flash/Mpp/ExchangeReceiver.cpp Show resolved Hide resolved
Copy link
Contributor

@SeaRise SeaRise left a comment

Choose a reason for hiding this comment

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

lgtm

dbms/src/Flash/Mpp/ExchangeReceiver.cpp Outdated Show resolved Hide resolved
@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 Feb 1, 2023
@xzhangxian1008
Copy link
Contributor Author

/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 Feb 1, 2023
@hongyunyan
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@hongyunyan: 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

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

Commit hash: 041546e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 1, 2023
@xzhangxian1008
Copy link
Contributor Author

/run-integration-test

@xzhangxian1008
Copy link
Contributor Author

/run-all-tests

@xzhangxian1008
Copy link
Contributor Author

/run-integration-test

2 similar comments
@SeaRise
Copy link
Contributor

SeaRise commented Feb 1, 2023

/run-integration-test

@xzhangxian1008
Copy link
Contributor Author

/run-integration-test

@ti-chi-bot
Copy link
Member

@xzhangxian1008: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

trigger some heavy tests which will not run always when PR updated.

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.

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 ti-chi-bot merged commit 7298855 into pingcap:master Feb 2, 2023
@xzhangxian1008 xzhangxian1008 deleted the issue_6686 branch February 2, 2023 03:18
solotzg added a commit to solotzg/tiflash that referenced this pull request Feb 2, 2023
ywqzzy pushed a commit to ywqzzy/tiflash_1 that referenced this pull request Feb 13, 2023
close pingcap#6686

Signed-off-by: ywqzzy <592838129@qq.com>
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/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.

unstable unit test cases ComputeServerRunner.*
5 participants