cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

kvserver: allow retrying scatter processing with more errors

Open kvoli opened this issue 1 year ago • 3 comments

Previously, scatter processing would only be retried when encountering a snapshot error. Other errors commonly occur, which we expect to be transient and retryable, such as the range descriptor changing or rejected lease transfers. The range descriptor change error being most common, due to the proclivity of clients to issue splits alongside scatter requests, which would update the range descriptor.

Retry failed scatter replicate processing if the returned error matches any of IsRetriableReplicationChangeErrors, similar to range splits. Note the maximum number of retries remains at 5 for scatter.

Resolves: #124522 Release note: None

kvoli avatar May 21 '24 22:05 kvoli

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

blathers-crl[bot] avatar May 21 '24 22:05 blathers-crl[bot]

This change is Reviewable

cockroach-teamcity avatar May 21 '24 22:05 cockroach-teamcity

Maybe while we're here we should rename maxAttempts and currentAttempt to maxSuccesses and successes to avoid confusing them with the retry attempt limit?

dt avatar May 23 '24 13:05 dt

bors r=nvanbenschoten

kvoli avatar May 28 '24 19:05 kvoli