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

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

lichunzhu
Copy link
Contributor

@lichunzhu lichunzhu commented Aug 26, 2021

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

ti-chi-bot commented Aug 26, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • amyangfei
  • glorv

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.

@sre-bot
Copy link

sre-bot commented Aug 26, 2021

@lichunzhu
Copy link
Contributor Author

/rebuild

@kennytm
Copy link
Contributor

kennytm commented Aug 26, 2021

should this be cherry-picked to 4.0, 5.0, 5.1, 5.2?

@lichunzhu
Copy link
Contributor Author

should this be cherry-picked to 4.0, 5.0, 5.1, 5.2?

Yes

@glorv
Copy link
Contributor

glorv commented Oct 11, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 547443f

@glorv
Copy link
Contributor

glorv commented Oct 11, 2021

/run-all-tests

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

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.

None yet

6 participants