Skip to content

[docs] Document KV leader replica capacity control #3673

Description

@wuchong

Search before asking

  • I searched the existing issues and found no documentation issue covering this feature.

Motivation

PR #3614 introduced resource-based KV leader replica capacity control to protect TabletServers from creating too many KV leader replicas. The feature is disabled by default and needs user-facing documentation explaining when and how to enable, disable, and configure it.

This was identified in the PR review discussion: #3614 (comment)

Documentation scope

Add documentation that covers:

  • The purpose and behavior of KV leader replica capacity control.
  • When operators should enable the feature and when leaving it disabled may be appropriate.
  • How to enable and disable the feature with kv.leader-replica.memory-reserved:
    • 0 disables memory-based capacity control.
    • A positive value enables capacity estimation.
  • How TabletServer resource capacity is detected and how it can be overridden with:
    • tablet-server.advertised-resource.cpu-cores
    • tablet-server.advertised-resource.memory-size
  • Clarification that advertised resource options report capacity to the CoordinatorServer and do not enforce CPU, memory, cgroup, or JVM limits.
  • The capacity calculation behavior:
    • The limit is applied only when more than half of live TabletServers report memory.
    • Unknown-memory TabletServers use the average memory of known TabletServers.
  • Example configuration for enabling, tuning, and disabling the feature.
  • Relevant metrics and the error users see when KV leader replica capacity is insufficient.

References

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions