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: don't repropose probes #102956

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions pkg/kv/kvserver/replica_raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -1374,8 +1374,22 @@ func (r *Replica) refreshProposalsLocked(

case reasonTicks:
if p.proposedAtTicks <= r.mu.ticks-refreshAtDelta {
// The command was proposed a while ago and may have been dropped. Try it again.
reproposals = append(reproposals, p)
// The command was proposed a while ago and may have been dropped. Try
// it again. We don't repropose probes to avoid growing the raft log
// quadratically in cases where many replicas are unavailable at the
// same time. (There will still be linear build-up as probes are
// reattempted).
if p.command.ReplicatedEvalResult.IsProbe {
p.finishApplication(ctx, proposalResult{
Err: kvpb.NewError(
kvpb.NewAmbiguousResultErrorf(
"not reproposing probe",
),
),
})
} else {
reproposals = append(reproposals, p)
}
}

default:
Expand Down