cockroachdb / cockroachdb/cockroach

kvserver: scatter never returns replicate queue process error

Open
#124,510 0 comments 0 reactions 0 assignees View on GitHub
A-kv-distribution C-bug T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

After https://github.com/cockroachdb/cockroach/commit/c9cf06893bf827a1752213aa3aebee2aaea35f13 we began shadowing a variable inside the process retry loop. This meant that an error from calling replicate queue process wouldn't escape the loop.

https://github.com/cockroachdb/cockroach/commit/c9cf06893bf827a1752213aa3aebee2aaea35f13#diff-1e9884dfbcc4eb6d90a152e1023fd2a84dcda68f04a877be8a01c16df0fe0331R4009-R4013

https://github.com/cockroachdb/cockroach/blob/5e4ca9e26f1a25681de9c944298cfa139c344466/pkg/kv/kvserver/replica_command.go#L4152-L4157

We also never returned the err, even if one existed:

https://github.com/cockroachdb/cockroach/blob/5e4ca9e26f1a25681de9c944298cfa139c344466/pkg/kv/kvserver/replica_command.go#L4216

Jira issue: CRDB-38936

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.