-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
storage: Re-apply the rule solver. #10507
Conversation
The commit message includes the string "1ef40f323b94005dd84378669da8296c9fec8e7cor " which probably should have been "1ef40f323b94005dd84378669da8296c9fec8e7 or". |
On second look, 1ef40f3 is not a SHA that exists in this repo, so I don't really know what that string was intended to be. |
Ah "1ef40f323b94005dd84378669da8296c9fec8e7c or" |
ok, tried to clean that up |
though I didn't look at the Review status: 0 of 7 files reviewed at latest revision, 4 unresolved discussions, some commit checks pending. pkg/storage/allocator.go, line 130 at r1 (raw file):
Is there any need for this field? It looks like this is only set to the value of the pkg/storage/replicate_queue.go, line 129 at r1 (raw file):
Should the error be logged? pkg/storage/replicate_queue.go, line 229 at r1 (raw file):
Include the error via a pkg/storage/store.go, line 105 at r1 (raw file):
I'd prefer to see this in Comments from Reviewable |
Reviewed 1 of 7 files at r1. pkg/storage/allocator.go, line 130 at r1 (raw file):
|
Review status: 1 of 7 files reviewed at latest revision, 5 unresolved discussions, some commit checks pending. pkg/storage/allocator.go, line 130 at r1 (raw file):
|
Reviewed 2 of 7 files at r1. pkg/storage/allocator.go, line 130 at r1 (raw file):
|
Review status: 3 of 7 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. pkg/storage/allocator.go, line 130 at r1 (raw file):
|
It would also be good to amend the commit message to be free-standing. That is, rather than only referring to other commits/PRs, include directly the change that is being introduced here. Reviewed 4 of 7 files at r1. pkg/storage/allocator.go, line 130 at r1 (raw file):
|
Addressed all the comments and added more info the commit message. Review status: 1 of 8 files reviewed at latest revision, 46 unresolved discussions, some commit checks pending. pkg/storage/allocator.go, line 145 at r1 (raw file):
|
Reviewed 7 of 7 files at r2. pkg/storage/allocator.go, line 507 at r1 (raw file):
|
Review status: 5 of 8 files reviewed at latest revision, 33 unresolved discussions. pkg/storage/allocator.go, line 507 at r1 (raw file):
|
Reviewed 3 of 3 files at r3. pkg/storage/allocator.go, line 507 at r1 (raw file):
|
Instead of applying 1ef40f3 or cockroachdb#10252, this finishes the reapplication of the rule solver. However, this also puts the rule solver under the environment flag COCKROACH_ENABLE_RULE_SOLVER for ease of testing and defaults to not enabled. This commit re-applies the rule solver, specifically the following commits: 1) 4446345 storage: add constraint rule solver for allocation Rules are represented as a single function that returns the candidacy of the store as well as a float value representing the score. These scores are then aggregated from all rules and returns the stores sorted by them. Current rules: - ruleReplicasUniqueNodes ensures that no two replicas are put on the same node. - ruleConstraints enforces that required and prohibited constraints are followed, and that stores with more positive constraints are ranked higher. - ruleDiversity ensures that nodes that have the fewest locality tiers in common are given higher priority. - ruleCapacity prioritizes placing data on empty nodes when the choice is available and prevents data from going onto mostly full nodes. 2) dd3229a storage: implemented RuleSolver into allocator The follow up to this commit is cockroachdb#10275 and a lot of testing to ensure that the rule solver does indeed perform as expected. Closes cockroachdb#9336
Review status: all files reviewed at latest revision, 18 unresolved discussions, all commit checks successful. pkg/storage/allocator.go, line 507 at r1 (raw file):
|
Reviewed 3 of 3 files at r4. pkg/storage/allocator_test.go, line 1750 at r1 (raw file):
|
Review status: all files reviewed at latest revision, 8 unresolved discussions, all commit checks successful. pkg/storage/allocator_test.go, line 1750 at r1 (raw file):
|
Review status: all files reviewed at latest revision, 8 unresolved discussions, all commit checks successful. pkg/storage/allocator_test.go, line 1750 at r1 (raw file):
|
Review status: all files reviewed at latest revision, 8 unresolved discussions, all commit checks successful. pkg/storage/rule_solver.go, line 220 at r2 (raw file):
|
@tamird, So I think I've covered everything here.. Am I good to merge? Review status: all files reviewed at latest revision, 8 unresolved discussions, all commit checks successful. Comments from Reviewable |
You have Pete's approval. On Nov 10, 2016 13:28, "Bram Gruneir" [email protected] wrote:
|
Instead of applying 1ef40f3 or #10252, this finishes the
reapplication of the rule solver. However, this also puts the rule solver under
the environment flag COCKROACH_ENABLE_RULE_SOLVER for ease of testing and defaults
to not enabled.
The follow up to this commit is #10275 and a lot of testing to ensure that the
rule solver does indeed perform as expected.
Closes #9336
This change is