Skip to content

kv: post-lease transfer promotion from expiration-based lease to epoch-based lease causes failed writes #117630

@nvb

Description

@nvb

In fc2d180, we adjusted the lease transfer protocol to pass through an expiration-based lease before being upgraded to an expiration-based lease. This works, but it means that the lease sequence advances twice during a lease transfer. As a result, writes proposed under the expiration-based lease can be re-ordered with the lease promotion and will fail below raft.

This can lead to RETRY_ASYNC_WRITE_FAILURE errors and may be the underlying cause of #90656 and #98553.

We should fix this, ideally by promoting from an expiration-based lease to an epoch-based lease without advancing the lease sequence number.

Jira issue: CRDB-35282

Metadata

Metadata

Assignees

Labels

A-kvAnything in KV that doesn't belong in a more specific category.A-read-committedRelated to the introduction of Read CommittedC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)O-supportWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docsP-2Issues/test failures with a fix SLA of 3 monthsT-kvKV Team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions