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

*: save exitSafeModeLoc in checkpoint, load it, upgrade strategy #988

Merged
merged 26 commits into from
Sep 10, 2020

Conversation

lance6716
Copy link
Collaborator

@lance6716 lance6716 commented Sep 3, 2020

What problem does this PR solve?

save ExitSafePointLoc in #915 to checkpoint

What is changed and how it works?

change structure of syncer checkpoint, add upgrade strategy

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Increased code complexity
  • Breaking backward compatibility (but with upgrade strategy)

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note
    support upstream no lock migration, such as from Aurora

@lance6716 lance6716 changed the title [WIP]*: save exitSafeModeLoc in checkpoint, load it, upgrade strategy *: save exitSafeModeLoc in checkpoint, load it, upgrade strategy Sep 4, 2020
@lance6716 lance6716 added needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 needs-update-docs Should update docs after this PR is merged. Remove this label once the docs are updated needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated status/WIP This PR is still work in progress type/feature New feature labels Sep 4, 2020
@lance6716 lance6716 added status/PTAL This PR is ready for review. Add this label back after committing new changes and removed status/WIP This PR is still work in progress labels Sep 7, 2020
@@ -1471,6 +1482,34 @@ func (s *testSyncerSuite) TestExitSafeModeByConfig(c *C) {
c.Assert(failpoint.Disable("github.com/pingcap/dm/syncer/SafeModeInitPhaseSeconds"), IsNil)
}

func (s *testSyncerSuite) TestRemoveMetadataIsFine(c *C) {
Copy link
Collaborator Author

@lance6716 lance6716 Sep 7, 2020

Choose a reason for hiding this comment

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

please help me think more senarios LoadMeta will return "metadata file can't found", which caused delete but IsFreshtask returned true so need read it

@csuzhangxc csuzhangxc added this to the v2.0.0 RC.3 milestone Sep 8, 2020
loader/loader.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Show resolved Hide resolved
syncer/checkpoint.go Show resolved Hide resolved
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added status/LGT1 One reviewer already commented LGTM and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Sep 8, 2020
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

@csuzhangxc csuzhangxc added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Sep 10, 2020
@lance6716 lance6716 merged commit a3ee2be into pingcap:master Sep 10, 2020
@ti-srebot
Copy link

cherry pick to release-2.0 failed

@lance6716
Copy link
Collaborator Author

/run-cherry-picker

@ti-srebot
Copy link

cherry pick to release-2.0 failed

@lance6716 lance6716 added already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked and removed needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 labels Sep 10, 2020
@lance6716 lance6716 added already-update-docs The docs related to this PR already updated. Add this label once the docs are updated and removed needs-update-docs Should update docs after this PR is merged. Remove this label once the docs are updated labels Sep 11, 2020
@csuzhangxc csuzhangxc added already-update-release-note The release note is updated. Add this label once the release note is updated and removed needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated labels Oct 27, 2020
@lance6716 lance6716 deleted the save-in-checkpoint branch July 6, 2021 02:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked already-update-docs The docs related to this PR already updated. Add this label once the docs are updated already-update-release-note The release note is updated. Add this label once the release note is updated status/LGT2 Two reviewers already commented LGTM, ready for merge type/feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants