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: also block LEARNER snaps to paused followers #85730

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

tbg
Copy link
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 erikgrinaker and a team August 8, 2022 11:18
@cockroach-teamcity
Copy link
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
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
Member Author

tbg commented Aug 10, 2022

bors r=erikgrinaker

@craig
Copy link
Contributor

craig bot commented Aug 10, 2022

Build failed (retrying...):

@craig
Copy link
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