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

kvserver: get rid of bespoke relocation logic used by the mergeQueue #62631

Merged
merged 3 commits into from
Mar 29, 2021

Commits on Mar 26, 2021

  1. kvserver: remove rotten comment inside AdminRelocateRange

    Release note: None
    aayush authored and aayushshah15 committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    7c08e57 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2021

  1. kvserver: update AdminRelocateRange to leverage explicit swaps of

    voters to non-voters
    
    This commit updates `AdminRelocateRange` to use explicit atomic swaps of
    voting replicas with non-voting replicas, that cockroachdb#58627 initially added
    support for. The patch does so by generalizing behavior that's already
    exercised by the `replicateQueue` when it decides to rebalance replicas.
    See cockroachdb#61239.
    
    This allows us, in the next commit, to remove bespoke relocation logic
    that's used by the `mergeQueue` to align replica sets for the sake of a
    range merge.
    
    Release note: None
    aayushshah15 committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    fb51671 View commit details
    Browse the repository at this point in the history
  2. kvserver: get rid of bespoke relocation logic used by the mergeQueue

    This commit removes the relocation logic used by the `mergeQueue` thus
    far to align replica sets (added in cockroachdb#56197). This logic previously
    existed in order to allow us to align the replica sets of a pair of
    ranges (which is required for the range merge to proceed), while
    avoiding redundant data movement.
    
    Before cockroachdb#58627 and the previous commit in this PR, `AdminRelocateRange`
    couldn't be directly used by the mergeQueue under various configurations
    of the LHS and RHS ranges. Furthermore, even when it could be used, it
    would involve redundant data movement. This all required us to compute
    relocation targets for the RHS of a merge separately, above the call to
    `AdminRelocateRange`, for the range merge to proceed.
    
    All these limitations have been resolved by the previous commit which
    teaches `AdminRelocateRange` to promote non-voters and demote voters
    when needed, and the aforementioned bespoke relocation logic is no
    longer needed.
    
    Release note: None
    aayushshah15 committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    d7a7a49 View commit details
    Browse the repository at this point in the history