-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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
- [YSQL] Implement wait queue infrastructure for Wait-on-Conflict concurrency control #9589
- [YSQL] Implement distributed deadlock detection #9590
- [DST] Unblock transactions waiting on operations from rolled-back subtransactions #13590
- [dst] Improve test coverage of Wait-on-Conflict concurrency control with tablet splitting #13582
- [dst] Fix wait_queue handling of single tablet transactions #14014
- [dst] Improve metrics collection related-to Wait-on-Conflict concurrency control #13584
- [docs] Update documentation for Wait-on-Conflict concurrency control #13894
- [YSQL] Integrate READ COMMITTED isolation with wait queue based Wait-on-Conflict concurrency control to detect deadlocks and for higher performance #13211
- [docdb] Support transaction promotion for geo-partitioned workloads in use of WaitQueue and DeadlockDetector in Wait-on-Conflict concurrency control #13585
Nice-to-have
- [dst] Delay start of deadlock detection for a configurable amount of time #13576
- [dst] Avoid conflict resolution if waiting transaction is unblocked from unresolvable conflict #13577
- [dst] Prefer push-based mechanism for signaling waiting transactions #13578
- [dst] Improve tail-latency for operations of transactions using wait queues #13580
- [DocDb] Optimize deadlock detection to detect conflicts local to tserver when present #13586
- [YSQL] Throw the same error message as Pg when a deadlock is detected #14114
- [DocDB] Rollback only the youngest deadlocked transaction needed to make progress #14165
- [DocDB] Handle rolling restart situations when the gflag enable_wait_queues is modified #14935
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status
Status