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

storage: Transfer lease to least-loaded store when rebalancing replicas #30256

Merged
merged 2 commits into from
Sep 20, 2018

Conversation

a-robinson
Copy link
Contributor

This logic was totally busted before due to indexing into the wrong
replicas slice, meaning we would often transfer the lease to the wrong
store.

Release note: None

@a-robinson a-robinson requested review from BramGruneir and a team September 15, 2018 19:43
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@BramGruneir
Copy link
Member

BramGruneir commented Sep 15, 2018 via email

Copy link
Contributor Author

@a-robinson a-robinson left a comment

Choose a reason for hiding this comment

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

Yeah, absolutely. Done (along with a couple tweaks to slightly improve decisions). PTAL

@a-robinson
Copy link
Contributor Author

ping @BramGruneir

Copy link
Member

@BramGruneir BramGruneir left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1, 3 of 3 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)

@a-robinson
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 19, 2018

Build failed (retrying...)

@craig
Copy link
Contributor

craig bot commented Sep 19, 2018

Build failed (retrying...)

@craig
Copy link
Contributor

craig bot commented Sep 19, 2018

Build failed

@a-robinson
Copy link
Contributor Author

Updated one line in the test to fix merge skew with #30143.

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 19, 2018

Build failed

@a-robinson
Copy link
Contributor Author

Heh, now that I've rebased on master it's failing due to #30435. I'll fix that up before continuing with this.

@a-robinson
Copy link
Contributor Author

I'll wait on this until #30422 is in, since it fixes the test failures.

This logic was totally busted before due to indexing into the wrong
replicas slice, meaning we would often transfer the lease to the wrong
store.

Also add a proper test for the replica/lease selection logic.

Release note: None
Further protect against picking rebalance targets that are somewhat full
by both extending the allocator_scorer convergeScore logic to add an
extra score for overfull stores, and add a couple fallback checks to
back up the convergeScore logic when needed.

Release note: None
@a-robinson
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Sep 20, 2018
27921: kubernetes: Add a secure config that can use externally created certs r=a-robinson a=a-robinson

For Kubernetes clusters that don't sign certificates properly, such as
EKS as discovered in a recent forum post:
https://forum.cockroachlabs.com/t/secure-cockroachdb-cluster-on-aws-eks/1824

Release note: None

--------------------

It's arguable that this isn't worth checking in. I'm not too attached to it if folks don't think we should, I just needed to publish it somewhere for the original poster of https://forum.cockroachlabs.com/t/secure-cockroachdb-cluster-on-aws-eks/1824 to be able to use it.

Touches #24527

30256: storage: Transfer lease to least-loaded store when rebalancing replicas r=a-robinson a=a-robinson

This logic was totally busted before due to indexing into the wrong
replicas slice, meaning we would often transfer the lease to the wrong
store.

Release note: None

Co-authored-by: Alex Robinson <alexdwanerobinson@gmail.com>
@craig
Copy link
Contributor

craig bot commented Sep 20, 2018

Build succeeded

@craig craig bot merged commit dda75b7 into cockroachdb:master Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants