Skip to content

kvserver: also block LEARNER snaps to paused followers#85730

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:paused-reject-replicate-snaps-too
Aug 10, 2022
Merged

kvserver: also block LEARNER snaps to paused followers#85730
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:paused-reject-replicate-snaps-too

Conversation

@tbg
Copy link
Copy Markdown
Member

@tbg tbg commented Aug 8, 2022

We checked whether the snapshot recipient was paused only in the
raft log queue path. By pushing the check down into sendSnapshot,
it is now hit by any snapshot attempt, which includes the replicate
queue and store rebalancer. For best results, both of these should
avoid moving replicas to paused followers in the first place, which
they already do, at least partially, so this change shouldn't have
much of an impact in practice.

Fixes #85479.

Release note: None

We checked whether the snapshot recipient was paused only in the
raft log queue path. By pushing the check down into `sendSnapshot`,
it is now hit by any snapshot attempt, which includes the replicate
queue and store rebalancer. For best results, both of these should
avoid moving replicas to paused followers in the first place, which
they already do, at least partially, so this change shouldn't have
much of an impact in practice.

Fixes cockroachdb#85479.

Release note: None
@tbg tbg requested review from a team and erikgrinaker August 8, 2022 11:18
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@tbg tbg marked this pull request as ready for review August 9, 2022 09:18
@tbg tbg requested a review from a team as a code owner August 9, 2022 09:18
Copy link
Copy Markdown
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@tbg
Copy link
Copy Markdown
Member Author

tbg commented Aug 10, 2022

bors r=erikgrinaker

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 10, 2022

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 10, 2022

Build succeeded:

@craig craig bot merged commit 9be7cf5 into cockroachdb:master Aug 10, 2022
@tbg tbg deleted the paused-reject-replicate-snaps-too branch August 11, 2022 08:39
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.

kvserver: don't send snapshots to overloaded learners

3 participants