Weak record locks in database query read processing
Abstract
A weak record locking scheme that, while enforcing serialization of record updates, permits a read to extract data from uncommitted updates. Specifically, records are locked in association with a process or thread performing a lock. When the records affected by a transaction are initially locked for reading or updating, they are locked at the process level. When a particular record is to be read or updated as part of a transaction, it is locked at the thread level. A read transaction that will accept uncommitted changes uses a weak lock to lock the record for reading. A weak lock may be made on a record so long as the record is not already locked for updating at the thread level. While a record is weakly locked for reading, it cannot be locked for updating at the thread level. A record may thus be weakly locked even though the record is locked for updating at the process level by the same process. Weak locking thus preserves serialization of updates, while reducing delays caused by locking conflicts.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 12.
Claims (3 — 1 Independent, 2 Dependent)
- Claim 1Independent Claim
A method of locking records in a multi-process or multi-user database system, comprising: locking records affected by an update transaction, including a particular record, as part of executing the update transaction, while the particular record is locked for updating, reading the particular record as part of a transaction that will accept uncommitted changes, through the steps of weakly locking the particular record, and then reading the particular record, wherein, while the particular record is weakly locked, the record cannot be updated by the update transaction.
- Claim 2Depends on #1
The method of claim 1 wherein records are locked in association with a process or thread performing a lock.
- Claim 3Depends on #1
The method of claim 1 wherein a record affected by a transaction is initially locked for reading or updat
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗