cockroachdb / cockroachdb/cockroach

move replicas from decommissioning nodes even if nodes are in unavailable state

Open
#99,064 2 comments 2 reactions 0 assignees View on GitHub
A-kv-distribution branch-master branch-release-20.1 branch-release-20.2 branch-release-21.1 branch-release-21.2 branch-release-22.1 branch-release-22.2 branch-release-23.1 branch-release-23.2 branch-release-24.1 branch-release-24.2 C-bug P-3 T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Dead and live nodes should be treated equally by allocator when they are marked as decommissioning. Currently allocator would only start moving voters from decommissioning node if it is live and ignore it if it is livenesspb.NodeLivenessStatus_UNAVAILABLE.

This behaviour will cause drain to wait for `server.time_until_store_dead` (5 minutes) till node is declared dead and that would trigger dead node rule to move voters away from it.

Ideally allocator should drain everything regardless of liveness, but internally both liveness and decommission states are represented by a single enum and liveness needs to take precedence so it masks decommissioning state. Handling states separately would allow allocator behaviour to be more consistent.

Jira issue: CRDB-25686

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.