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

release-2.1: storage: Don't transfer leases to behind replicas in StoreRebalancer #30972

Merged
merged 1 commit into from
Oct 5, 2018

Conversation

a-robinson
Copy link
Contributor

Backport 1/1 commits from #30938.

/cc @cockroachdb/release


Transferring a lease to a replica that's behind can cause all requests
to the range to stall, as the old leaseholder thinks it's no longer the
leaseholder but the new leaseholder doesn't know it's the leaseholder
yet. This avoids creating such scenarios in the StoreRebalancer.

Release note (bug fix): Avoids an edge case in load-based
rebalancing where we could transfer the lease for a range to a replica
that isn't keeping up with the other replicas, causing brief periods
where no replicas think they're leaseholder for the range and thus no
requests can be processed for the range.

Reproduction in a-robinson@933cbd5, demonstrating that transferring a lease to a behind replica causes all requests to stall.

@a-robinson a-robinson requested review from petermattis and a team October 4, 2018 18:35
Transferring a lease to a replica that's behind can cause all requests
to the range to stall, as the old leaseholder thinks it's no longer the
leaseholder but the new leaseholder doesn't know it's the leaseholder
yet. This avoids creating such scenarios in the StoreRebalancer.

Release note (bug fix): Avoids an edge case in load-based
rebalancing where we could transfer the lease for a range to a replica
that isn't keeping up with the other replicas, causing brief periods
where no replicas think they're leaseholder for the range and thus no
requests can be processed for the range.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)

@a-robinson a-robinson merged commit 135e0f6 into cockroachdb:release-2.1 Oct 5, 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