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

relay: don't purge relay logs when connected to last source (#1400) #1428

Merged
merged 3 commits into from
Feb 5, 2021

Conversation

ti-srebot
Copy link

@ti-srebot ti-srebot commented Feb 4, 2021

cherry-pick #1400 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/1428

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

git push [email protected]:ti-srebot/dm.git pr/1428:release-2.0-efa5b30ee9be

What problem does this PR solve?

close #1398

What is changed and how it works?

Purge relay log directory when switch to different upstream.

If reconnected to same upstream, relay will look at position saved in relay meta and needed position which specified by user or saved in syncer checkpoint. If relay.meta is left behind, purge the relay folder

Check List

Tests

  • Integration test
  • Manual test (check in changed integration test, relay-dir has indeed contained "mysql-bin.000001")

Code changes

Side effects

Related changes

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

@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 status/PTAL This PR is ready for review. Add this label back after committing new changes type/cherry-pick This PR is just a cherry-pick (backport) labels Feb 4, 2021
@lance6716 lance6716 merged commit 3b06a77 into pingcap:release-2.0 Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated status/PTAL This PR is ready for review. Add this label back after committing new changes type/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants