Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
concurrency: allow multiple transactions to hold locks on a single key
Locks on a single key are stored in the `lockState` struct. Prior to this patch, the lock table only expected a single transaction to hold a lock on a given key at any point in time. This restriction needs to be lifted for shared locks, whose semantics allow multiple transactions to hold locks on a single key. This patch changes the `lockState` datastructure so that it can be generalized in the future. We don't actually allow multiple transactions to acquire locks on a single key just yet -- that'll come in a subsequent patch. Informs cockroachdb#91545 Release note: None
- Loading branch information