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

Refine error propagation in local tunnel #5824

Merged

Conversation

windtalker
Copy link
Contributor

Signed-off-by: xufei xufeixw@mail.ustc.edu.cn

What problem does this PR solve?

Issue Number: ref #5095

Problem Summary:
When in local tunnel mode, if ExchangeReceiver meet some error, local tunnel will call consumerFinish with error message, but currently, the error message is just Receiver Finish/Receiver closed, it does not contain any useful information.

What is changed and how it works?

This pr add a new interface cancel to ExchangePacketReader, and if exchange receiver meet error, it will call cancel to pass the error message to local tunnel explicitly.

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 8, 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.

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/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 8, 2022
@SeaRise SeaRise self-requested a review September 8, 2022 05:30
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 Sep 8, 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 8, 2022
@windtalker
Copy link
Contributor Author

/rebuild

@windtalker
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@windtalker: 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: 62c00e8

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

sre-bot commented Sep 8, 2022

Coverage for changed files

Filename                      Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ExchangeReceiver.cpp              438               261    40.41%          36                24    33.33%         613               348    43.23%         222               156    29.73%
ExchangeReceiver.h                 14                 2    85.71%          12                 2    83.33%          26                 6    76.92%           2                 0   100.00%
GRPCReceiverContext.cpp            53                20    62.26%          23                12    47.83%         131                66    49.62%          28                13    53.57%
GRPCReceiverContext.h               3                 1    66.67%           3                 1    66.67%           5                 1    80.00%           0                 0         -
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                             508               284    44.09%          74                39    47.30%         775               421    45.68%         252               169    32.94%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18670      8199             56.08%    216004  84329        60.96%

full coverage report (for internal network access only)

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 8, 2022

Coverage for changed files

Filename                      Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ExchangeReceiver.cpp              438               134    69.41%          36                 4    88.89%         613               143    76.67%         222                79    64.41%
ExchangeReceiver.h                 14                 1    92.86%          12                 1    91.67%          26                 3    88.46%           2                 0   100.00%
GRPCReceiverContext.cpp            53                11    79.25%          23                 5    78.26%         131                36    72.52%          28                10    64.29%
GRPCReceiverContext.h               3                 0   100.00%           3                 0   100.00%           5                 0   100.00%           0                 0         -
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                             508               146    71.26%          74                10    86.49%         775               182    76.52%         252                89    64.68%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18689      8131             56.49%    216173  83573        61.34%

full coverage report (for internal network access only)

Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
@windtalker windtalker force-pushed the refine_error_propagation_in_local_tunnel branch from 558e304 to 1910ac1 Compare September 8, 2022 08:57
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Sep 8, 2022
@windtalker
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@windtalker: 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 Sep 8, 2022

Coverage for changed files

Filename                      Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ExchangeReceiver.cpp              438               134    69.41%          36                 4    88.89%         613               143    76.67%         222                80    63.96%
ExchangeReceiver.h                 14                 1    92.86%          12                 1    91.67%          26                 3    88.46%           2                 0   100.00%
GRPCReceiverContext.cpp            53                11    79.25%          23                 5    78.26%         131                36    72.52%          28                10    64.29%
GRPCReceiverContext.h               3                 0   100.00%           3                 0   100.00%           5                 0   100.00%           0                 0         -
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                             508               146    71.26%          74                10    86.49%         775               182    76.52%         252                90    64.29%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18690      8132             56.49%    216178  83565        61.34%

full coverage report (for internal network access only)

@ti-chi-bot
Copy link
Member

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

Commit hash: 1910ac1

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

sre-bot commented Sep 8, 2022

Coverage for changed files

Filename                      Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ExchangeReceiver.cpp              438               134    69.41%          36                 4    88.89%         613               143    76.67%         222                78    64.86%
ExchangeReceiver.h                 14                 1    92.86%          12                 1    91.67%          26                 3    88.46%           2                 0   100.00%
GRPCReceiverContext.cpp            53                11    79.25%          23                 5    78.26%         131                36    72.52%          28                10    64.29%
GRPCReceiverContext.h               3                 0   100.00%           3                 0   100.00%           5                 0   100.00%           0                 0         -
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                             508               146    71.26%          74                10    86.49%         775               182    76.52%         252                88    65.08%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18690      8132             56.49%    216178  83603        61.33%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit 462b545 into pingcap:master Sep 8, 2022
@windtalker windtalker deleted the refine_error_propagation_in_local_tunnel branch January 30, 2023 12:49
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.

5 participants