Skip to content

server: fix decomm status replica overcounting for r1#57812

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:201210.decomm-status-overcounting
Dec 11, 2020
Merged

server: fix decomm status replica overcounting for r1#57812
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:201210.decomm-status-overcounting

Conversation

@irfansharif
Copy link
Copy Markdown
Contributor

When scanning the KV keyspace for all range descriptors, we want to scan
from Meta2Prefix to MetaMax (see meta2RangeIter for other usages of
this). In our decomm status codepaths we were erroneously starting off
our scan at MetaMin, so including meta1 in our scans as well. This has
the effect of iterating over the range descriptor for r1 twice (first
observed in #57650 where we cargo-culted these bounds).

Release note (bug fix): When displaying replica counts during the
decommissioning process, previously we were overcounting the
replicas displayed for r1. This is no longer the case.

When scanning the KV keyspace for all range descriptors, we want to scan
from Meta2Prefix to MetaMax (see meta2RangeIter for other usages of
this). In our decomm status codepaths we were erroneously starting off
our scan at MetaMin, so including meta1 in our scans as well. This has
the effect of iterating over the range descriptor for r1 twice (first
observed in cockroachdb#57650 where we cargo-culted these bounds).

Release note (bug fix): When displaying replica counts during the
decommissioning process, previously we were overcounting the
replicas displayed for r1. This is no longer the case.
@irfansharif irfansharif requested review from knz and tbg December 11, 2020 03:31
@irfansharif irfansharif requested a review from a team as a code owner December 11, 2020 03:31
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @tbg)

@irfansharif
Copy link
Copy Markdown
Contributor Author

TFTR! Looks like CI is red due to the registration server crapping out, I'll pick it up after.

@irfansharif
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 11, 2020

Build succeeded:

@craig craig bot merged commit a37fdb2 into cockroachdb:master Dec 11, 2020
@irfansharif irfansharif deleted the 201210.decomm-status-overcounting branch December 11, 2020 20:12
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