Skip to content

[YSQL] Support wait-on-conflict concurrency control #5680

@rkarthik007

Description

@rkarthik007

Jira Link: DB-1529

In many scenarios, wait-on-conflict behavior is desirable, wherein the DB will wait for existing transactions (that might otherwise conflict) to complete before making progress.

Wait-on-conflict semantics are already part of READ COMMITTED isolation level. This is done via internal statement retries (in the query layer) with exponential backoff when a transaction detects conflicting transactions. A wait-queue based implementation will ensure lower latencies and be more resource efficient since it would eliminate statement retries.

Also, the wait queue based implementation should be agnostic to the isolation level i.e., it will allow wait-on-conflict semantics for all isolation levels.

Design doc - https://docs.google.com/document/d/1DCg4FjGlYZNBBIPcADk7z2B2TGznNHWtr8hU-0dUXyo/edit

Tracking Project: https://github.com/yugabyte/yugabyte-db/projects/67

TODO: Convert this doc to a .md file once the implementation has been completed.

Functional requirements

Nice-to-have

Analytics

Metadata

Metadata

Assignees

Labels

area/ysqlYugabyte SQL (YSQL)kind/enhancementThis is an enhancement of an existing featurepriority/mediumMedium priority issueroadmap-tracking-issueThis issue tracks a major roadmap item, and usually appears in the roadmap list.

Type

No type

Projects

Status

Done

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions