Multi-row transactions
First Claim
1. A method comprising:
- acquiring, from a lock service, a lock on a row of a database table, the row representing a transaction;
after acquiring the lock, writing data to a plurality of database rows as part of the transaction, the plurality of database rows not including the row representing the transaction;
querying the lock service to validate the lock after writing the data to the plurality of database rows;
attempting to commit the transaction after successfully validating the lock;
wherein attempting to commit the transaction comprises attempting to atomically add the row representing the transaction to the database table;
wherein the method is performed by one or more computing devices.
7 Assignments
0 Petitions
Accused Products
Abstract
Techniques are provided for more efficient multi-row atomic, consistent, isolated and durable (ACID)-compliant transactions with snapshot isolation semantics (or just “multi-row transactions” for short). In some embodiments, the techniques are implemented in a computing system that includes a client application, a lightweight in-memory lease-based lock service, a multi-row transaction orchestrator, and an underlying database system. The transaction orchestrator implements a read protocol and a write protocol that provides support to the client application for carrying out multi-row transactions against the underlying database system irrespective of whether the database system itself supports multi-row transactions. The transaction orchestrator explicitly maintains transaction-level locks obtained from the lease-based lock service as part of the transaction protocol. Further, the transaction orchestrator is tolerant to lock service failure and unavailability without compromising ACID-compliance and snapshot isolation guarantees to the client application.
-
Citations
20 Claims
-
1. A method comprising:
-
acquiring, from a lock service, a lock on a row of a database table, the row representing a transaction; after acquiring the lock, writing data to a plurality of database rows as part of the transaction, the plurality of database rows not including the row representing the transaction; querying the lock service to validate the lock after writing the data to the plurality of database rows; attempting to commit the transaction after successfully validating the lock; wherein attempting to commit the transaction comprises attempting to atomically add the row representing the transaction to the database table; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A system comprising:
-
one or more computing devices having at least a processor and memory and including a transaction orchestrator that; acquires, from a lock service, a lock on a row of a database table, the row representing transaction; writes data to a plurality of database rows after acquiring the lock, wherein the plurality of database rows do not include the row representing the transaction; queries the lock service to validate the lock after writing the data to the plurality of database rows; attempts to atomically add the row to the database table after successfully validating the lock in an attempt to commit the transaction. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification