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

placement: use id as store key (#2205) #2222

Merged
merged 2 commits into from
Mar 10, 2020
Merged

Conversation

disksing
Copy link
Contributor

Signed-off-by: disksing i@disksing.com

What problem does this PR solve?

cherry-pick #2205 to resolve #2203

What is changed and how it works?

  • startKey and endKey can be duplicated, use groupID+ID instead
  • check data consistency and recover when load rules

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
    • insert some rules with same key, make sure it won't be over written
    • use old pd to write some rules, then start new pd, the wrong key are recovered

Code changes

  • Has persistent data change

Signed-off-by: disksing <i@disksing.com>
@disksing disksing added this to the v3.1.0-rc milestone Mar 10, 2020
@codecov-io
Copy link

codecov-io commented Mar 10, 2020

Codecov Report

Merging #2222 into release-3.1 will decrease coverage by 0.06%.
The diff coverage is 41.46%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-3.1    #2222      +/-   ##
===============================================
- Coverage        74.87%   74.81%   -0.07%     
===============================================
  Files              195      195              
  Lines            19987    20006      +19     
===============================================
+ Hits             14965    14967       +2     
- Misses            3884     3894      +10     
- Partials          1138     1145       +7
Impacted Files Coverage Δ
server/schedule/placement/rule.go 94.11% <100%> (ø) ⬆️
server/core/storage.go 72.72% <100%> (+0.86%) ⬆️
server/schedule/placement/rule_manager.go 71.12% <31.42%> (-11.67%) ⬇️
server/tso/tso.go 77.37% <0%> (-5.11%) ⬇️
server/region_syncer/client.go 78.44% <0%> (-2.59%) ⬇️
pkg/etcdutil/etcdutil.go 82.6% <0%> (-1.45%) ⬇️
server/member/leader.go 75.51% <0%> (-1.03%) ⬇️
pkg/btree/btree.go 86.84% <0%> (-0.81%) ⬇️
server/server.go 63.89% <0%> (-0.43%) ⬇️
server/handler.go 51.61% <0%> (+0.43%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e783dd6...f51c66c. Read the comment docs.

@disksing
Copy link
Contributor Author

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 10, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

@disksing merge failed.

@disksing
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

@disksing merge failed.

@disksing
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

@disksing merge failed.

@disksing
Copy link
Contributor Author

/run-integration-common-test tidb-test=release-3.1

@disksing
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

/run-all-tests

@sre-bot sre-bot merged commit e7aeaff into tikv:release-3.1 Mar 10, 2020
@disksing disksing deleted the cp2205 branch March 10, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/schedule Scheduling logic. status/can-merge Indicates a PR has been approved by a committer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants