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

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

Merged
merged 3 commits into from
Jun 28, 2022

Conversation

overvenus
Copy link
Member

What problem does this PR solve?

Issue Number: ref #4757

What is changed and how it works?

Add liveness to TiCDC.

TiCDC sets liveness to Stopping upon receiving SIGTERM.
The exit perdure wait TiCDC drains all its tables and ownership (not implemented yet).

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

None

…eriodSeconds

Signed-off-by: Neil Shen <overvenus@gmail.com>
@overvenus overvenus added area/ticdc Issues or PRs related to TiCDC. component/api HTTP API. labels Jun 28, 2022
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jun 28, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 3AceShowHand

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 28, 2022
@overvenus
Copy link
Member Author

/run-all-tests

@hicqu
Copy link
Contributor

hicqu commented Jun 28, 2022

LGTM

cdc/capture/capture.go Outdated Show resolved Hide resolved
Signed-off-by: Neil Shen <overvenus@gmail.com>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 28, 2022
@3AceShowHand
Copy link
Contributor

/run-unit-test

@3AceShowHand
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@3AceShowHand: /merge in this pull request requires 2 approval(s).

In response to this:

/merge

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.

@3AceShowHand
Copy link
Contributor

/run-kafka-integration-test

@overvenus overvenus merged commit 0f1ad1e into pingcap:fb/latency Jun 28, 2022
@overvenus overvenus deleted the fb/latency-signal branch June 28, 2022 12:37
@@ -704,7 +704,7 @@ func (h *OpenAPI) ListCapture(c *gin.Context) {
// @Produce json
// @Success 200,202
// @Failure 500,400 {object} model.HTTPError
// @Router /api/v1/captures/drain [post]
// @Router /api/v1/captures/drain [put]
Copy link
Member

Choose a reason for hiding this comment

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

why use PUT method here?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a correction. It have been changed into PUT by #6044.

overvenus added a commit to overvenus/ticdc that referenced this pull request Jun 30, 2022
…eriodSeconds (pingcap#6097)

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

Signed-off-by: Neil Shen <overvenus@gmail.com>
ti-chi-bot pushed a commit that referenced this pull request Jun 30, 2022
…eriodSeconds (#6097)

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

Signed-off-by: Neil Shen <overvenus@gmail.com>
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 <overvenus@gmail.com>

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

Signed-off-by: Neil Shen <overvenus@gmail.com>

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

Signed-off-by: Neil Shen <overvenus@gmail.com>

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

Signed-off-by: Neil Shen <overvenus@gmail.com>

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

Signed-off-by: Neil Shen <overvenus@gmail.com>

* fix ut

* apply comments

* fix integration test

* fix lint

Co-authored-by: Obliviate <756541536@qq.com>
Co-authored-by: qupeng <qupeng@pingcap.com>
Co-authored-by: maxshuang <huangguohao@pingcap.com>
Co-authored-by: Neil Shen <overvenus@gmail.com>
Co-authored-by: Yujie Xia <xiayjchn@gmail.com>
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. component/api HTTP API. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants