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

owner(cdc): clean up admin jobs on async close #6129

Merged
merged 5 commits into from
Jun 30, 2022

Conversation

overvenus
Copy link
Member

What problem does this PR solve?

Issue Number: close #6128

What is changed and how it works?

Clean up admin jobs and reject future jobs on async close.

Check List

Tests

  • Unit test

Questions

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

Release note

Fix an issue that changefeed API may be blocked during owner resign.

@overvenus overvenus added the area/ticdc Issues or PRs related to TiCDC. label Jun 30, 2022
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jun 30, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 3AceShowHand
  • asddongmen

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/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jun 30, 2022
@overvenus overvenus marked this pull request as ready for review June 30, 2022 06:53
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 30, 2022
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 30, 2022
@@ -571,9 +573,30 @@ func (o *ownerImpl) takeOwnerJobs() []*ownerJob {
func (o *ownerImpl) pushOwnerJob(job *ownerJob) {
o.ownerJobQueue.Lock()
defer o.ownerJobQueue.Unlock()
if atomic.LoadInt32(&o.closed) != 0 {
log.Info("reject owner job as owner has been closed")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about also log the rejected job?

@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 Jun 30, 2022
Signed-off-by: Neil Shen <[email protected]>
@overvenus
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 932d5a0

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 30, 2022
@overvenus
Copy link
Member Author

/run-all-tests

@ti-chi-bot
Copy link
Member

@overvenus: 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.

@ti-chi-bot ti-chi-bot merged commit ef49f2a into pingcap:master Jun 30, 2022
asddongmen pushed a commit that referenced this pull request Jul 1, 2022
)

* syncer(dm): init schemaTracker when syncer run (#6052)

close #6014

* cdc: upgrade pebble and stabilize a case (#6116)

close #5798

* meta(engine): Resourcemeta support job level isolation (#5817)

close #5816

* owner(cdc): clean up admin jobs on async close (#6129)

close #6128

* pkg/errctx(engine): avoid creating goroutinue in errctx (#6061)

ref #6013

* cdc,pkg: accommodate systemd TimeoutStopSec and k8s terminationGracePeriodSeconds (#6097)

* cdc,pkg: accommodate systemd TimeoutStopSec and k8s terminationGracePeriodSeconds
* cdc: correct drain capture doc

Signed-off-by: Neil Shen <[email protected]>

* cdc: drain waits for owner resign and table move out

Signed-off-by: Neil Shen <[email protected]>

* tp(cdc): make drain capture scheduler aware of capture state

Signed-off-by: Neil Shen <[email protected]>

* cdc: remove verbose log and set liveness stop after resign owner

Signed-off-by: Neil Shen <[email protected]>

* cdc: skip owner resign when there is only one capture

Signed-off-by: Neil Shen <[email protected]>

* fix ut

* apply comments

* fix integration test

* fix lint

Co-authored-by: Obliviate <[email protected]>
Co-authored-by: qupeng <[email protected]>
Co-authored-by: maxshuang <[email protected]>
Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: Yujie Xia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ticdc Issues or PRs related to TiCDC. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Owner jobs may leak when resign owner
4 participants