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

kvclient(ticdc): close the grpc client after all goroutine exited to prevent data race and panic #10865

Merged
merged 5 commits into from
Apr 2, 2024

Conversation

3AceShowHand
Copy link
Contributor

@3AceShowHand 3AceShowHand commented Mar 29, 2024

What problem does this PR solve?

Issue Number: close #10799

What is changed and how it works?

  • use errgroup context to control grpc stream, to make it can be canceld.
  • do not set the grpc stream to nil after CloseSend

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

`None`

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 29, 2024
@ti-chi-bot ti-chi-bot bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 29, 2024
@3AceShowHand 3AceShowHand reopened this Mar 29, 2024
Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Merging #10865 (207491d) into master (db60e9e) will decrease coverage by 0.1204%.
Report is 3 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
Components Coverage Δ
cdc 61.6824% <100.0000%> (-0.1951%) ⬇️
dm 51.3141% <ø> (+0.0646%) ⬆️
engine 63.4585% <ø> (+0.0635%) ⬆️
Flag Coverage Δ
unit 57.4355% <100.0000%> (-0.1204%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff                @@
##             master     #10865        +/-   ##
================================================
- Coverage   57.5558%   57.4355%   -0.1204%     
================================================
  Files           853        850         -3     
  Lines        126974     125257      -1717     
================================================
- Hits          73081      71942      -1139     
+ Misses        48454      47931       -523     
+ Partials       5439       5384        -55     

@3AceShowHand
Copy link
Contributor Author

/test all

@3AceShowHand 3AceShowHand changed the title [DNM]schema(ticdc): non integer primary key is not handle key kvclient(ticdc): close the grpc client after all goroutine exited to prevent data race and panic Apr 2, 2024
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Apr 2, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Apr 2, 2024
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 2, 2024
Copy link
Contributor

ti-chi-bot bot commented Apr 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asddongmen, CharlesCheung96

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CharlesCheung96,asddongmen]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 2, 2024
Copy link
Contributor

ti-chi-bot bot commented Apr 2, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-02 03:13:16.090268028 +0000 UTC m=+327257.617808576: ☑️ agreed by CharlesCheung96.
  • 2024-04-02 06:57:30.999477598 +0000 UTC m=+340712.527018145: ☑️ agreed by asddongmen.

@3AceShowHand
Copy link
Contributor Author

/retest

@3AceShowHand
Copy link
Contributor Author

/test cdc-integration-storage-test

@ti-chi-bot ti-chi-bot bot merged commit f796972 into pingcap:master Apr 2, 2024
28 checks passed
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Apr 15, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #10906.

@3AceShowHand
Copy link
Contributor Author

/cherry-pick release-7.5

@ti-chi-bot
Copy link
Member

@3AceShowHand: new pull request could not be created: failed to create pull request against pingcap/tiflow#release-7.5 from head ti-chi-bot:cherry-pick-10865-to-release-7.5: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-10865-to-release-7.5."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

In response to this:

/cherry-pick release-7.5

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 bot pushed a commit that referenced this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cdc panic: runtime error: invalid memory address or nil pointer dereference
4 participants