-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvserver: expired expiration leases prevent closed timestamp updates #99812
Copy link
Copy link
Closed
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)GA-blockerbranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.branch-release-23.1Used to mark GA and release blockers, technical advisories, and bugs for 23.1Used to mark GA and release blockers, technical advisories, and bugs for 23.1
Description
Expired expiration leases can prevent closed timestamp updates:
cockroach/pkg/kv/kvserver/replica_closedts.go
Lines 61 to 67 in 60b7440
| // We need to own the lease but note that stasis (LeaseState_UNUSABLE) doesn't | |
| // matter. | |
| valid := st.IsValid() || st.State == kvserverpb.LeaseState_UNUSABLE | |
| if !valid || !st.OwnedBy(r.StoreID()) { | |
| res.FailReason = sidetransport.InvalidLease | |
| return res | |
| } |
This can be problematic when enabling kv.expiration_leases_only.enabled, because we don't eagerly extend leases unless there's traffic on the range, preventing the closed timestamp from advancing. The lease scheduler in #98433 would mitigate this.
Jira issue: CRDB-26097
Epic CRDB-25200
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)GA-blockerbranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.branch-release-23.1Used to mark GA and release blockers, technical advisories, and bugs for 23.1Used to mark GA and release blockers, technical advisories, and bugs for 23.1