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

Move the guts of Store.RemoveReplica to the processRaft thread. #2349

Merged
merged 1 commit into from
Sep 3, 2015

Conversation

bdarnell
Copy link
Contributor

@bdarnell bdarnell commented Sep 3, 2015

Closes #1911.

@BramGruneir
Copy link
Member

LGTM once you sort out the test failures.

@bdarnell bdarnell force-pushed the remove-replica-race branch from 897793c to 0d559e9 Compare September 3, 2015 20:45
@bdarnell
Copy link
Contributor Author

bdarnell commented Sep 3, 2015

Fixed the tests. The fix was unfortunately a little unclean; Store.MergeRange must now be aware of the fact that it is run only from the processRaft goroutine so it can call removeReplicaImpl directly.

@tamird
Copy link
Contributor

tamird commented Sep 3, 2015

LGTM

bdarnell added a commit that referenced this pull request Sep 3, 2015
Move the guts of Store.RemoveReplica to the processRaft thread.
@bdarnell bdarnell merged commit a185f18 into cockroachdb:master Sep 3, 2015
@bdarnell bdarnell deleted the remove-replica-race branch September 3, 2015 22:08
bdarnell added a commit to bdarnell/cockroach that referenced this pull request Sep 3, 2015
This fixes a race between range creation (implicit in
ProposeRaftCommand) and removal by serializing both operations in the
processRaft goroutine (removal was moved to this goroutine in cockroachdb#2349).
The race would manifest as a "stuck" command (usually an intent
resolution) after a range was merged.

Fixes cockroachdb#2312.

Verified by running TestTree in a loop.
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.

3 participants