release-23.2.11-rc: kvserver: enqueue decom ranges at an interval behind a setting #130413
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 2/2 commits from #130117 on behalf of @kvoli.
/cc @cockroachdb/release
Introduce the
ranges.decommissioning
gauge metric, which representsthe number of ranges with at least one replica on a decommissioning
node.
The metric is reported by the leaseholder, or if there is no valid
leaseholder, the first live replica in the descriptor, similar to
(under|over)-replication metrics.
The metric can be used to approximately identify the distribution of
decommissioning work remaining across nodes, as the leaseholder replica
is responsible for triggering the replacement of decommissioning
replicas for its own range.
Informs: #130085
Release note (ops change): The
ranges.decommissioning
metric is added,representing the number of ranges which have a replica on a
decommissioning node.
When
kv.enqueue_in_replicate_queue_on_problem.interval
is set to apositive non-zero value, leaseholder replicas of ranges which are
underreplicated will be enqueued into the replicate queue every
kv.enqueue_in_replicate_queue_on_problem.interval
interval.When
kv.enqueue_in_replicate_queue_on_problem.interval
is set to 0,no enqueueing on underreplication will take place, outside of the
regular replica scanner.
A recommended value for users enabling the enqueue (non-zero), is 15
minutes e.g.,
Resolves: #130085
Release note (ops change): The
ranges.decommissioning
metric is added,representing the number of ranges which have a replica on a
decommissioning node.
Release justification: Low risk observability change and otherwise disabled by default behavior change which when enabled alleviates a class of decommission stalls.