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: fix "inverted range" panic #6143

Merged
merged 1 commit into from
Apr 19, 2016

Conversation

bdarnell
Copy link
Contributor

The store now returns NotLeaderError instead of a malformed
RangeKeyMismatchError when a request is addressed to an uninitialized
replica. The replica that caused the creation of the uninitialized
replica is used as our best guess for the current leader.

Guard against regressions by checking the validity of the descriptor
passed to NewRangeKeyMismatchError. Also add an admittedly complex
regression test.

Fixes #6027


This change is Reviewable

@tbg
Copy link
Member

tbg commented Apr 19, 2016

:lgtm:

Mind referencing #6144 in the commit message?

Reviewed 6 of 6 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


kv/dist_sender_server_test.go, line 673 [r1] (raw file):
Punctuation (?)


roachpb/metadata.go, line 130 [r1] (raw file):
Punctuation (?)


Comments from Reviewable

The store now returns NotLeaderError instead of a malformed
RangeKeyMismatchError when a request is addressed to an uninitialized
replica. The replica that caused the creation of the uninitialized
replica is used as our best guess for the current leader.

Guard against regressions by checking the validity of the descriptor
passed to NewRangeKeyMismatchError. Also add an admittedly complex
regression test.

Fixes cockroachdb#6027
@bdarnell
Copy link
Contributor Author

I don't see how #6144 would make sense in the commit message. That issue would be an alternative (and more general) solution, but it's a future work item and so the proper place for it is an issue.

@bdarnell bdarnell merged commit 9239a3c into cockroachdb:master Apr 19, 2016
@bdarnell bdarnell deleted the inverted-range branch April 19, 2016 17:01
@tbg
Copy link
Member

tbg commented Apr 19, 2016

I just wanted #6144 linked to this PR (and vice versa), but mentioning it here was actually all required for that, so fine by me.

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.

2 participants