US 7,548,919 B2
Computer program product for conducting a lock free read
Monish Gupta, Santa Clara, Calif. (US); and Scott David Lashley, Portland, Oreg. (US)
Assigned to International Business Machines Corporation, Armonk, N.Y. (US)
Filed on Sep. 22, 2006, as Appl. No. 11/534,564.
Prior Publication US 2008/0077591 A1, Mar. 27, 2008
Int. Cl. G06F 17/30 (2006.01)
U.S. Cl. 707—8  [707/100; 707/200] 7 Claims
OG exemplary drawing
 
1. A computer program product comprising a computer readable storage medium having computer usable program code programmed and executed by a processor for conducting a lock free read, the operations of the computer program product comprising:
receiving a write transaction request on a record, the received write transaction request comprising at least a first operation on the record and a second operation on the record;
conducting a two-phase exclusive-lock locking procedure for the received write transaction request on the record using a lock data structure, wherein the lock data structure includes a last committed log sequence number and a transaction flag for the record, the transaction flag indicating whether the transaction corresponding to the last committed log sequence number is an insert operation, an update operation, or a delete operation, and wherein the last committed log sequence number points to data corresponding to a last committed version of the record;
performing the first operation of the transaction on the record, and committing a corresponding change to the record;
updating the last committed log sequence number and the transaction flag, wherein the updated last committed log sequence number points to the committed corresponding change to the record and the updated transaction flag indicates whether the performed first operation is an insert operation, an update operation, or a delete operation;
receiving a read transaction request for the record;
generating an updated last committed version of the record based on the updated last committed log sequence number and the updated transaction flag in response to receiving the read transaction request, the updated last committed version of the record that is generated comprising the committed corresponding change to the record;
returning the updated last committed version of the record that is generated in response to the read transaction request, and
performing the second operation on the record and releasing the two-phase exclusive-lock locking procedure.