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: avoid merge deadlock when concurrent split wins #31366

Merged
merged 1 commit into from Oct 15, 2018

Conversation

Projects
None yet
3 participants
@benesch
Member

benesch commented Oct 15, 2018

Backport 1/1 commits from #31294.

/cc @cockroachdb/release


@bdarnell, in a stroke of luck, the existing conditional put API supports deleting the existing value when you pass nil.


When merging two adjacent ranges P and Q, we need to be careful to
delete Q's range descriptor with a conditional put, or we can deadlock
with a concurrent split. See the comments and test case within for
details. This commit fixes the last issue that is blocking merges from
being turned on by default.

Release note: None

storage: avoid merge deadlock when concurrent split wins
When merging two adjacent ranges P and Q, we need to be careful to
delete Q's range descriptor with a conditional put, or we can deadlock
with a concurrent split. See the comments and test case within for
details. This commit fixes the last issue that is blocking merges from
being turned on by default.

Release note: None

@benesch benesch requested review from bdarnell and tschottdorf Oct 15, 2018

@benesch benesch requested a review from cockroachdb/core-prs as a code owner Oct 15, 2018

@cockroach-teamcity

This comment has been minimized.

Show comment
Hide comment
@cockroach-teamcity

cockroach-teamcity Oct 15, 2018

Member

This change is Reviewable

Member

cockroach-teamcity commented Oct 15, 2018

This change is Reviewable

@benesch benesch merged commit 8c8cdce into cockroachdb:release-2.1 Oct 15, 2018

2 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
license/cla Contributor License Agreement is signed.
Details

@benesch benesch deleted the benesch:backport2.1-31294 branch Oct 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment