Skip to content

cdc: ensure Deregister::Conn is always triggered#18246

Merged
ti-chi-bot[bot] merged 2 commits intotikv:masterfrom
wlwilliamx:fix/cdc-always-deregister-conn
Feb 25, 2025
Merged

cdc: ensure Deregister::Conn is always triggered#18246
ti-chi-bot[bot] merged 2 commits intotikv:masterfrom
wlwilliamx:fix/cdc-always-deregister-conn

Conversation

@wlwilliamx
Copy link
Contributor

What is changed and how it works?

Issue Number: Close #18245

What's Changed:

This PR ensures that Deregister::Conn(conn_id) is always executed when a CDC connection closes, even if an error occurs in recv_req. Previously, if an error happened early, the deregistration step could be skipped, leading to potential connection leaks.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

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

Release note

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. dco-signoff: no Indicates the PR's author has not signed dco. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Feb 24, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 24, 2025

Welcome @wlwilliamx!

It looks like this is your first PR to tikv/tikv 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to tikv/tikv. 😃

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 24, 2025

Hi @wlwilliamx. Thanks for your PR.

I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 24, 2025
@wlwilliamx
Copy link
Contributor Author

/CC @hicqu @3AceShowHand

@ti-chi-bot ti-chi-bot bot requested a review from hicqu February 24, 2025 10:13
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 24, 2025

@wlwilliamx: GitHub didn't allow me to request PR reviews from the following users: 3AceShowHand.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/CC @hicqu @3AceShowHand

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 kubernetes-sigs/prow repository.

@wlwilliamx
Copy link
Contributor Author

/CC @3AceShowHand

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 24, 2025

@wlwilliamx: GitHub didn't allow me to request PR reviews from the following users: 3AceShowHand.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/CC @3AceShowHand

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 kubernetes-sigs/prow repository.

@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 Feb 24, 2025
@wlwilliamx wlwilliamx force-pushed the fix/cdc-always-deregister-conn branch from 4ee47ea to 537031b Compare February 24, 2025 11:57
@wlwilliamx
Copy link
Contributor Author

/check-dco

Signed-off-by: wlwilliamx <wlwilliamx@gmail.com>
Signed-off-by: wlwilliamx <wlwilliamx@gmail.com>
@wlwilliamx wlwilliamx force-pushed the fix/cdc-always-deregister-conn branch from 537031b to 7fd2076 Compare February 24, 2025 12:00
@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. and removed dco-signoff: no Indicates the PR's author has not signed dco. labels Feb 24, 2025
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Feb 24, 2025
@wlwilliamx
Copy link
Contributor Author

/check-issue-triage-complete

@ti-chi-bot ti-chi-bot bot added the lgtm label Feb 25, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3AceShowHand, hicqu

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

The pull request process is described here

Details Needs approval from an approver in each of these files:

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 25, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Feb 25, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-24 12:41:41.394592497 +0000 UTC m=+273249.347750747: ☑️ agreed by hicqu.
  • 2025-02-25 07:53:36.726528586 +0000 UTC m=+342364.679686851: ☑️ agreed by 3AceShowHand.

@3AceShowHand
Copy link
Contributor

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Feb 25, 2025
@ti-chi-bot ti-chi-bot bot merged commit 3e008c1 into tikv:master Feb 25, 2025
8 checks passed
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Feb 25, 2025
@LykxSassinator LykxSassinator added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Feb 26, 2025
@ti-chi-bot
Copy link
Member

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

ti-chi-bot bot pushed a commit that referenced this pull request Feb 26, 2025
close #18245

This PR ensures that Deregister::Conn(conn_id) is always executed when a CDC connection closes, even if an error occurs in recv_req. Previously, if an error happened early, the deregistration step could be skipped, leading to potential connection leaks.

Signed-off-by: wlwilliamx <wlwilliamx@gmail.com>

Co-authored-by: wlwilliamx <wlwilliamx@gmail.com>
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Apr 9, 2025
@ti-chi-bot
Copy link
Member

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

ti-chi-bot bot pushed a commit that referenced this pull request Apr 16, 2025
close #18245

This PR ensures that Deregister::Conn(conn_id) is always executed when a CDC connection closes, even if an error occurs in recv_req. Previously, if an error happened early, the deregistration step could be skipped, leading to potential connection leaks.

Signed-off-by: wlwilliamx <wlwilliamx@gmail.com>

Co-authored-by: wlwilliamx <wlwilliamx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved contribution This PR is from a community contributor. dco-signoff: yes Indicates the PR's author has signed the dco. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. ok-to-test Indicates a PR is ready to be tested. 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.

Ensure Deregister::Conn Is Always Triggered in CDC Connection Handling

5 participants