cockroachdb / cockroachdb/cockroach

kvserver: lease history for ranges is not useful with expiration leases

Open
#118,481 0 comments 0 reactions 0 assignees View on GitHub
A-kv-observability C-bug O-testcluster P-2 T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

In memory we store a lease history report which is often useful to track where a lease was at some point in time to track down other behavior. WIth expiration leases, this report becomes useless since it is updated on every lease renewal (every 3s). Ideally we should update this only when the lease sequence changes.

Only the last 5 lease transfers are tracked and shown.

**To Reproduce**

Set a system up with expiration leases enabled `SET CLUSTER SETTING kv.expiration_leases_only.enabled = true`

VIew the range report some range: https://#/reports/range/

Notice that it only has ~15s of history on that page
![image (3)](https://github.com/cockroachdb/cockroach/assets/46975918/5bb87b65-0608-4e40-83f4-5068464cbada)

**Expected behavior**
Only actual lease transfers should be shown. This will be more important as expiration leases become the default for all customers.

**Environment:**
- CockroachDB version 24.1

Jira issue: CRDB-35756

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.