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 nil pointer panic during replica changes #40961

Commits on Sep 23, 2019

  1. storage: fix nil pointer panic during replica changes

    Before this PR there was a bug whereby a command attempting to move a range out
    of a joint config would fail to find a RangeDescriptor for a range because it
    was racing with a merge which destroyed that range. The code used to panic.
    
    This fix is simply detecting the nil and not attempting to move out of a
    joint config on a range that no longer exists. Another slightly less problematic
    but still wrong case was if the merged range had been resplit at the same key.
    In this case we might attempt to modify a different range.
    
    This PR is almost exclusively testing.
    
    Fixes cockroachdb#40877.
    
    Release justification: Fixes a panic.
    
    Release note: None
    ajwerner committed Sep 23, 2019
    Configuration menu
    Copy the full SHA
    1f55bb1 View commit details
    Browse the repository at this point in the history