Skip to content

kv: pipeline replicated lock acquisition #117978

@nvb

Description

@nvb

Replicated lock acquisition currently replicates through Raft synchronously. This can impose a high latency on read committed transactions which perform a large number of SELECT FOR UPDATE operations or a large number of FK lookups.

This was discussed in the Read Committed RFC under the Row-Level Locks > Reliability and Enforcement section. That section also outlined a collection of possible optimizations that we could make to avoid this latency penalty.

The most promising of the optimizations is to pipeline this lock acquisition using the using AsyncConsensus infrastructure. This will require client-side tracking and a new protocol to validate pipelined lock acquisition. It is analogous to our existing write intent pipelining approach.

Jira issue: CRDB-35440

Metadata

Metadata

Assignees

Labels

A-kv-transactionsRelating to MVCC and the transactional model.A-read-committedRelated to the introduction of Read CommittedC-performancePerf of queries or internals. Solution not expected to change functional behavior.GA-blockerT-kvKV Teambranch-release-24.1Used to mark GA and release blockers, technical advisories, and bugs for 24.1

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions