Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

syncer: update active relay log at fake rotate event (#1448) #1468

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

ti-srebot
Copy link

@ti-srebot ti-srebot commented Mar 1, 2021

cherry-pick #1448 to release-2.0
You can switch your code base to this Pull Request by using git-extras:

# In dm repo:
git pr https://github.com/pingcap/dm/pull/1468

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/dm.git pr/1468:release-2.0-1ec8439a21fe

What problem does this PR solve?

in #1393, we support only specify GTID with no binlog filename, so we can't update active relay log filename at init time. Although active relay log will be updated when after checkpoint-flush-interval seconds and receiving an event, for the first checkpoint-flush-interval seconds, purge-relay will fail because of no active relay log, which may confuse user.

What is changed and how it works?

when only specify GTID with no binlog filename, use fake rotate event to update active relay log.

also, add a integration test to make sure active relay log is forwarded when there's only DML

Check List

Tests

  • Integration test

Code changes

  • Has exported variable/fields change

Side effects

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release note

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot added needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated type/cherry-pick This PR is just a cherry-pick (backport) labels Mar 1, 2021
@ti-srebot ti-srebot requested review from GMHDBJD and lichunzhu March 1, 2021 06:04
Copy link
Collaborator

@GMHDBJD GMHDBJD left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

@lichunzhu lichunzhu left a comment

Choose a reason for hiding this comment

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

/lgtm

@lichunzhu
Copy link
Contributor

/merge

@ti-srebot
Copy link
Author

@lichunzhu Oops! This PR requires at least 1 LGTMs to merge. The current number of LGTM is 0

Copy link
Contributor

@lichunzhu lichunzhu left a comment

Choose a reason for hiding this comment

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

LGTM

@lance6716 lance6716 merged commit 242a682 into pingcap:release-2.0 Mar 1, 2021
@lance6716 lance6716 removed the needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated label Mar 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants