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

drainer: fix filter skip checkpoint problem (#1069) #1075

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #1069

What problem does this PR solve?

  1. When pump continuously writes binlogs, it won't write any fake binlog
  2. When drainer filters dml/ddl binlogs, it won't update checkpoint using filtered binlog's commit_ts.

If we continuously write TiDB but filter most tables, drainer's checkpoint tso won't update in a long time has some bad effects:

  1. make users think drainer is stuck
  2. triggers drainer checkpoint not change alert
  3. waste time to recover from a much former checkpoint

What is changed and how it works?

Rewrite filtered binlogs to fake binlogs (commit ts = filtered binlog's commit ts) and send to drainer.
To avoid too many fake binlogs, we only re-generate fake binlogs after AT LEAST 3 SECONDS.

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • Has exported function/method change

Side effects

  • Possible performance regression

Related changes

  • Need to cherry-pick to the release branch

Release note

  • No release note

@ti-chi-bot
Copy link
Member Author

ti-chi-bot commented Oct 11, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • glorv
  • lichunzhu

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.

@glorv
Copy link
Contributor

glorv commented Oct 11, 2021

@nongfushanquan PTAL, we need to merge this PR to v5.2.1.

@lichunzhu
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member Author

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

Commit hash: 20ddd85

@glorv
Copy link
Contributor

glorv commented Oct 12, 2021

/run-all-tests

1 similar comment
@purelind
Copy link
Collaborator

/run-all-tests

@ti-chi-bot ti-chi-bot merged commit b6be90d into pingcap:release-5.2 Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants