cockroachdb / cockroachdb/cockroach

kvserver: acquire allocator token when processing replicas in split / merge queue

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

Description

**Is your feature request related to a problem? Please describe.**
In #119410 we introduced the allocator token, a per-replica token that is acquired when processing a replica via the replicate queue, lease queue and store rebalancer. The token is used to provide some degree of isolation between concurrent actors making range configuration changes.

Splitting and merging also make these configuration changes.

**Describe the solution you'd like**

Acquire and release the allocator token when processing a replica via the split and merge queues. Also, introduce a purgatory for both queues, so that replicas may be retried upon encountering an already held token.

**Describe alternatives you've considered**

We could also do nothing and wait for a descriptor changed error, which is later retried.

Jira issue: CRDB-37577

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.