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

server, schedule: check region epoch before adding operators. #1095

Merged
merged 3 commits into from
May 30, 2018

Conversation

disksing
Copy link
Contributor

The Schedulers/Checkers are run by selecting a Region from the Cluster, generating operator by some sort of calculation and adding it to the coordinator.
There is a flaw in this process: if the region is changed after being selected out, wrong operator may be added and executed.
This PR fixes the problem by checking the region's epoch is unchanged before adding the operator.

@disksing disksing requested review from nolouch and Connor1996 May 28, 2018 10:35
@disksing disksing added priority/P1 The issue has P1 priority. needs-cherry-pick-release-2.0 The PR needs to cherry pick to release-2.0 branch. labels May 29, 2018
Copy link
Contributor

@nolouch nolouch 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
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

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

LGTM

@disksing
Copy link
Contributor Author

/run-all-tests

@disksing disksing merged commit b2286ad into tikv:master May 30, 2018
@disksing disksing deleted the operator-epoch branch May 30, 2018 01:37
nolouch pushed a commit to nolouch/pd that referenced this pull request May 30, 2018
)

* server, schedule: check region epoch before adding operators.

* add test.
nolouch pushed a commit to nolouch/pd that referenced this pull request May 30, 2018
)

* server, schedule: check region epoch before adding operators.

* add test.
siddontang pushed a commit that referenced this pull request May 31, 2018
* server: fix the issue that panic when collecting hot-cache metrics (#1091)

* server: fix the issue that panic when collecting hot-cache metrics

* server, schedule: check region epoch before adding operators. (#1095)

* server, schedule: check region epoch before adding operators.

* add test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-2.0 The PR needs to cherry pick to release-2.0 branch. priority/P1 The issue has P1 priority.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants