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

changefeed (ticdc): fix owner stuck when closing a changefeed #6882

Merged
merged 9 commits into from
Aug 25, 2022

Conversation

asddongmen
Copy link
Contributor

@asddongmen asddongmen commented Aug 25, 2022

What problem does this PR solve?

Issue Number: close #6859

What is changed and how it works?

Use c.isReleased instead of c.initialized to determine whether we should release resources of a changefeed, otherwise if an error occurs in the middle of c.initialize(), the c.initialized will be false, so the resources of a changefeed would not be release expectantly, which leads to some goroutines leak and can not be cancel by c.cancel().

Check List

Tests

  • Integration test
  • Manual test (add detailed scripts or steps below)
  1. make build-failpoint
  2. start cdc server
  3. create a changefeed
  4. error occur when changefeed initializing, and this changefeed will be closed immediately
    image
  5. cli changefeed [ pasue ,resume ,remove ] this changefeed, all commands work well which indicate the owner is working normally.

Questions

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

Release note

Fix a bug thak may cause cdc unavailable if a changefeed initializing fails.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 25, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nongfushanquan
  • zhaoxinyu

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-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 25, 2022
@asddongmen
Copy link
Contributor Author

/run-integration-tests

@ti-chi-bot ti-chi-bot added do-not-merge/needs-triage-completed needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. needs-cherry-pick-release-5.1 Should cherry pick this PR to release-5.1 branch. needs-cherry-pick-release-5.2 Should cherry pick this PR to release-5.2 branch. needs-cherry-pick-release-5.3 Should cherry pick this PR to release-5.3 branch. needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.0 Should cherry pick this PR to release-6.0 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.2 Should cherry pick this PR to release-6.2 branch. and removed do-not-merge/needs-linked-issue do-not-merge/needs-triage-completed labels Aug 25, 2022
@asddongmen asddongmen removed needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. labels Aug 25, 2022
@ti-chi-bot
Copy link
Member

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

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.

@asddongmen
Copy link
Contributor Author

/run-integration-tests
/run-kafka-integration-tests

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #6887.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Aug 25, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #6888.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Aug 25, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #6889.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Aug 25, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #6890.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Aug 25, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #6892.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Aug 25, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #6893.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Aug 25, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Aug 25, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #6894.

@asddongmen asddongmen deleted the dongmen/fix_owner_stuck branch September 16, 2022 05:26
@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-5.1 Should cherry pick this PR to release-5.1 branch. needs-cherry-pick-release-5.2 Should cherry pick this PR to release-5.2 branch. needs-cherry-pick-release-5.3 Should cherry pick this PR to release-5.3 branch. needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.0 Should cherry pick this PR to release-6.0 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.2 Should cherry pick this PR to release-6.2 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 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.

redo log changefeed stuck after network chaos injection
5 participants