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-21.1: kvserver: add safeguard against spurious calls to AdminRelocateRange #64303

Merged

Commits on Apr 27, 2021

  1. kvserver: add safeguard against spurious calls to AdminRelocateRange

    This commit adds checks inside of `AdminRelocateRange` to fail if the
    lists of relocation targets passed in by the caller contain duplicates.
    This is supposed to act as a safeguard against catastrophic outcomes
    like a range getting spuriously downreplicated due to malformed input.
    
    Release note: None
    aayushshah15 committed Apr 27, 2021
    Configuration menu
    Copy the full SHA
    38cdbd1 View commit details
    Browse the repository at this point in the history
  2. kvserver: prevent the StoreRebalancer from downreplicating a range

    Prior to this commit, we had a bug inside one of the methods used by the
    `StoreRebalancer` where we had two variables referring to a slice that
    was subsequently being appended to.
    
    The code was making the implicit assumption that both of these slices
    would point to the same underlying array, which is not true since any of
    the additions mentioned above could result in the underlying array for
    one of the slices being resized.
    
    This commit fixes this bug.
    
    Resolves cockroachdb#64064
    
    Release note (bug fix): A bug in previous 21.1 betas allowed the store
    rebalancer to spuriously downreplicate a range during normal operation.
    This bug is now fixed.
    aayushshah15 committed Apr 27, 2021
    Configuration menu
    Copy the full SHA
    80a5c7f View commit details
    Browse the repository at this point in the history