Skip to content

Commit

Permalink
concurrency: allow multiple transactions to hold locks on a single key
Browse files Browse the repository at this point in the history
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
arulajmani committed Aug 19, 2023
1 parent 5552988 commit 21266a2
Show file tree
Hide file tree
Showing 2 changed files with 634 additions and 499 deletions.
Loading

0 comments on commit 21266a2

Please sign in to comment.