Skip to content

kvserver: stop spuriously refusing non-voters in replicateQueue.shouldQueue()#61967

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
aayushshah15:20210312_replicateShouldQueueBug
Mar 22, 2021
Merged

kvserver: stop spuriously refusing non-voters in replicateQueue.shouldQueue()#61967
craig[bot] merged 1 commit intocockroachdb:masterfrom
aayushshah15:20210312_replicateShouldQueueBug

Conversation

@aayushshah15
Copy link
Copy Markdown
Contributor

Before this commit, the replicateQueue would refuse to queue up a
replica into the queue (in its shouldQueue method) for the rebalancing
case unless it could verify that a voting replica needed to be
rebalanced. This was an unfortunate oversight since it meant that unless
there was a voting replica to be rebalanced, non-voters would not get
rebalanced by the queue.

This commit fixes this bug.

Noticed while debugging a flakey test for #61682

Release justification: bug fix
Release note: None

@aayushshah15 aayushshah15 requested review from andreimatei and nvb March 13, 2021 04:27
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@aayushshah15 aayushshah15 changed the title kvserver: fix bug in replicateQueue.shouldQueue() kvserver: stop spuriously refusing non-voters in replicateQueue.shouldQueue() Mar 13, 2021
Copy link
Copy Markdown
Contributor

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

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

:lgtm: but no test? :)

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)

@aayushshah15 aayushshah15 force-pushed the 20210312_replicateShouldQueueBug branch 2 times, most recently from e0d950d to 4d2dbd0 Compare March 22, 2021 05:11
@aayushshah15
Copy link
Copy Markdown
Contributor Author

but no test? :)

Added a test, PTAL.

@aayushshah15 aayushshah15 force-pushed the 20210312_replicateShouldQueueBug branch 2 times, most recently from 31e4c0c to 54bf0e0 Compare March 22, 2021 06:01
Copy link
Copy Markdown
Contributor

@nvb nvb 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 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @aayushshah15)

…ldQueue()`

Before this commit, the `replicateQueue` would refuse to queue up a
replica into the queue (in its `shouldQueue` method) for the rebalancing
case unless it could verify that a voting replica needed to be
rebalanced. This was an unfortunate oversight since it meant that unless
there was a voting replica to be rebalanced, non-voters would not get
rebalanced by the queue.

This commit fixes this bug.

Noticed while debugging a flakey test for cockroachdb#61682

Release justification: bug fix
Release note: None
@aayushshah15 aayushshah15 force-pushed the 20210312_replicateShouldQueueBug branch 2 times, most recently from 54bf0e0 to 1961be1 Compare March 22, 2021 16:25
@aayushshah15
Copy link
Copy Markdown
Contributor Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 22, 2021

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 22, 2021

Build succeeded:

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.

4 participants