Skip to content

Commit

Permalink
Merge #88288
Browse files Browse the repository at this point in the history
88288: kvserver: log retriable errors received during splits r=aayushshah15 a=aayushshah15

Informs #87837

Release note: None

Co-authored-by: Aayush Shah <[email protected]>
  • Loading branch information
craig[bot] and aayushshah15 committed Sep 21, 2022
2 parents 1936d22 + f197e2b commit bbcb10f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/kv/kvserver/replica_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ func (r *Replica) executeAdminCommandWithDescriptor(
// that suggested this.
retryOpts.RandomizationFactor = 0.5
var lastErr error
splitRetryLogLimiter := log.Every(10 * time.Second)
for retryable := retry.StartWithCtx(ctx, retryOpts); retryable.Next(); {
// The replica may have been destroyed since the start of the retry loop.
// We need to explicitly check this condition. Having a valid lease, as we
Expand Down Expand Up @@ -552,6 +553,9 @@ func (r *Replica) executeAdminCommandWithDescriptor(
!errors.HasType(lastErr, (*roachpb.AmbiguousResultError)(nil)) {
break
}
if splitRetryLogLimiter.ShouldLog() {
log.Warningf(ctx, "retrying split after err: %v", lastErr)
}
}
return roachpb.NewError(lastErr)
}
Expand Down

0 comments on commit bbcb10f

Please sign in to comment.