-
Notifications
You must be signed in to change notification settings - Fork 409
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 bug that TiFlash will crash when enable both async_grpc_client and local_tunnel #4322
Conversation
Signed-off-by: fuzhe1989 <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-all-tests |
if (!handler->retrySucceed(now)) | ||
tmp.push_back(handler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the now should before this line to get the real now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retrySucced
is expected light enough, so we only need to call Clock::now()
once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you test this PR when enable or disable local tunnel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@fzhedu now the ci will test:
The missing part is to test them on multi-node env. |
/merge |
@fuzhe1989: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger 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. |
This pull request has been accepted and is ready to merge. Commit hash: 7c56fea
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
In response to a cherrypick label: cannot checkout |
Signed-off-by: fuzhe1989 [email protected]
What problem does this PR solve?
Issue Number: close #4321
Problem Summary:
When enable both async_grpc_client and local_tunnel, and the ExchangeReceiver has multiple connections, then TiFlash might crash due to access out of bound.
This bug can't be detected from ci test since ci env only has one node.
Root cause: the
reactor
usesreq->source_index
as the array index, however when there's a local connection, the array size is less than the connction count by 1.What is changed and how it works?
Do not use
source_index
, directly use handler pointer.Check List
Tests
Side effects
Documentation
Release note