tikv / tikv/pd

election: improve lease renewal observability, stability, and performance

Open
#10,653 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Enhancement Task

PD lease renewal is currently tied too closely to the configured lease TTL in some paths. When the lease TTL is increased, the `KeepAliveOnce` cadence can also become slower, which works against the goal of keeping leadership leases from expiring under runtime stalls, slow scheduling, or transient etcd latency.

Track lease renewal improvements around:

- Observability: expose and refine metrics/logging for renewal latency, response interval, remaining TTL, and termination reasons.
- Stability: make renewal cadence less sensitive to large lease TTL values and reduce lease-expiration risk.
- Performance: keep the renewal loop lightweight and avoid unnecessary load while preserving a safe renewal frequency.

Initial scoped PR:

- Use a fixed upper bound for PD election lease `KeepAliveOnce` intervals so increasing the lease TTL does not proportionally slow renewal.

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.