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

ha: refactor the schedule model #473

Merged
merged 125 commits into from
Feb 18, 2020
Merged

ha: refactor the schedule model #473

merged 125 commits into from
Feb 18, 2020

Conversation

csuzhangxc
Copy link
Member

@csuzhangxc csuzhangxc commented Feb 10, 2020

What problem does this PR solve?

the HA model before this PR can't tolerate well, and can't support pause-relay/pause-task correctly.

What is changed and how it works?

rewrite the HA mode, see pkg/ha/doc.go.

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

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to update the dm/dm-ansible
  • Need to be included in the release note

@csuzhangxc csuzhangxc added priority/important Major change, requires approval from ≥2 primary reviewers status/WIP This PR is still work in progress labels Feb 10, 2020
@csuzhangxc csuzhangxc changed the title ha: refactor the schedule mode ha: refactor the schedule model Feb 10, 2020
pkg/ha/doc.go Outdated Show resolved Hide resolved
pkg/ha/doc.go Show resolved Hide resolved
csuzhangxc and others added 2 commits February 10, 2020 21:15
Co-Authored-By: WangXiangUSTC <wx347249478@gmail.com>
Copy link
Contributor

@WangXiangUSTC WangXiangUSTC 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.

rest LGTM


// WatchSourceBound watches PUT & DELETE operations for the bound relationship of the specified DM-worker.
// For the DELETE operations, it returns an empty bound relationship.
func WatchSourceBound(ctx context.Context, cli *clientv3.Client,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we return error for retry?

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=release-3.0

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=release-3.0

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=release-3.0

@lichunzhu
Copy link
Contributor

/run-all-tests tidb=release-3.0

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=release-3.0

lichunzhu and others added 4 commits February 18, 2020 23:07
# Conflicts:
#	_utils/terror_gen/errors_release.txt
#	dm/master/coordinator/coordinator.go
#	dm/master/election.go
#	dm/master/server.go
#	pkg/terror/error_list.go
#	tests/ha/run.sh
@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=release-3.0

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=release-3.0

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=release-3.0

@csuzhangxc csuzhangxc merged commit 24c7693 into ha-dev Feb 18, 2020
@csuzhangxc csuzhangxc removed the status/WIP This PR is still work in progress label Feb 20, 2020
@csuzhangxc csuzhangxc deleted the ha-refactor branch February 21, 2020 08:09
lichunzhu pushed a commit to lichunzhu/dm that referenced this pull request Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority/important Major change, requires approval from ≥2 primary reviewers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants