Database processing after a lock condition
First Claim
1. A computer implemented method, comprising:
- receiving a release of a lock on data of a database, wherein the lock on the data was provided to a first transaction responsive to a first request to access the data, wherein one or more queued transactions are waiting in a lock queue to access the data;
associating, prior to the lock, a snapshot of the data with a second transaction;
determining whether the data was modified by processing of the first transaction associated with the first request based on whether a flag was set prior to the receiving the release of the lock;
providing the lock to access the data to the second transaction from the lock queue;
determining that the flag was set prior to receiving the release of the lock; and
refreshing the snapshot of the data associated with the second transaction prior to an execution of the second transaction and based on a snapshot isolation level;
wherein at least one of the receiving, determining, and providing are performed by one or more computers.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed herein are system, method, and computer program product embodiments for performing database processing after a lock condition. An embodiment operates by receiving a release of a lock on data of a database. It is determined whether the data was modified by a processing of a first transaction associated with the first request. The lock is provided to a second transaction associated with a second request to access the data. If the first transaction did not modify the data, a second transaction associated with the second request is retried without refreshing a snapshot of the data. If the first transaction modified the data, the snapshot of the data is refreshed before the second transaction is retried.
33 Citations
20 Claims
-
1. A computer implemented method, comprising:
-
receiving a release of a lock on data of a database, wherein the lock on the data was provided to a first transaction responsive to a first request to access the data, wherein one or more queued transactions are waiting in a lock queue to access the data; associating, prior to the lock, a snapshot of the data with a second transaction; determining whether the data was modified by processing of the first transaction associated with the first request based on whether a flag was set prior to the receiving the release of the lock; providing the lock to access the data to the second transaction from the lock queue;
determining that the flag was set prior to receiving the release of the lock; andrefreshing the snapshot of the data associated with the second transaction prior to an execution of the second transaction and based on a snapshot isolation level; wherein at least one of the receiving, determining, and providing are performed by one or more computers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A system, comprising:
-
a memory; and at least one processor coupled to the memory and configured to; receive a release of a lock on data of a database, wherein the lock on the data was provided to a first transaction responsive to a first request to access the data, wherein one or more queued transactions are waiting in a lock queue to access the data; associate, prior to the lock, a snapshot of the data with a second transaction; determine whether the data was modified by processing of the first transaction associated with the first request based on whether a flag was set prior to the receiving the release of the lock; provide the lock to the second transaction, from the lock queue, associated with a second request to access the data; determine that the flag was set prior to receiving the release of the lock; and refresh the snapshot of the data associated with the second transaction prior to an execution of the second transaction and based on a snapshot isolation level. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18)
-
-
19. A non-transitory computer-readable device having instructions stored thereon that, when executed by at least one computing device, causes the at least one computing device to perform operations comprising:
-
receiving a release of a lock on data of a database, wherein the lock on the data was provided to a first transaction responsive to a first request to access the data, wherein one or more queued transactions are waiting in a lock queue to access the data; associating, prior to the lock, a snapshot of the data with a second transaction; determining whether the data was modified by processing of the first transaction associated with the first request based on whether a flag was set prior to the receiving the release of the lock; providing the lock to the second transaction, from the lock queue, associated with a second request to access the data; determining that the flag was set prior to receiving the release of the lock; and refreshing the snapshot of the data associated with the second transaction prior to an execution of the second transaction and based on a snapshot isolation level. - View Dependent Claims (20)
-
Specification