Distributed transactions with extended locks
AssigneeRed Hat, Inc.
InventorMark Little
Life of this patent
Estimating the term…
Abstract
Various examples are directed to systems and methods for distributed transactions with extended locks. A transaction node may receive from a coordinator node an instruction to execute an assigned operation on an object. The assigned operation may be part of a distributed transaction. The transaction node may obtain a lock associated with the object and execute the assigned operation. The transaction node may also set a time-to-expiration of a lock timer to an initial value and start the lock timer. When the transaction node determines that the lock timer has expired, it may release the lock.
Claims21
A system for executing a compensation transaction, the system comprising:
- at least one processor and operatively associated memory, wherein the at least one processor is programmed to execute a transaction node, and wherein the transaction node is programmed to:
- receive from a coordinator node an instruction to execute an assigned operation on an object, wherein the assigned operation is part of a distributed transaction;
- responsive to receiving the instruction, obtain a lock associated with the object, wherein the lock entitles the transaction node to read and write to the object;
- execute the assigned operation;
- set a time-to-expiration of a lock timer to an initial value;
- start the lock timer;
- monitor at least one attempt to access the object by at least one other process while the transaction node holds the lock;
- determine that the at least one attempt to access the object exceeds a first threshold number of attempts;
- responsive to determining that the at least one attempt to access the object exceeds a first threshold number of attempts, increase the time-to-expiration for the lock timer;
- determine that the lock timer has expired;
- and
- responsive to determining that the lock timer has expired, release the lock.
A computer system for executing a distributed transaction, the computer system comprising:
- at least one processor and operatively associated memory, wherein the at least one processor is programmed to execute a transaction node, and wherein the transaction node is programmed to:
- receive from a coordinator node an instruction to execute an assigned operation on an object, wherein the assigned operation is part of a distributed transaction;
- obtain a lock associated with the object, wherein the lock entitles the transaction node to read and write to the object;
- execute the assigned operation;
- set a time-to-expiration of a lock timer to an initial value;
- responsive to successful execution of the assigned operation, start the lock timer;
- determine that the lock timer has expired;
- and
- release the lock.
A method for executing a distributed transaction, the method comprising:
- executing, by a computing device, a transaction node, wherein the computing device comprises at least one processor and operatively associated memory;
- receiving, by the transaction node and from a coordinator node, an instruction to execute an assigned operation on an object, wherein the assigned operation is part of a distributed transaction;
- responsive to receiving the instruction, obtaining, by the transaction node, a lock associated with the object, wherein the lock entitles the computing device to read and write to the object;
- executing, by the transaction node, the assigned operation;
- setting, by the transaction node, a time-to-expiration of a lock timer to an initial value;
- starting the lock timer, by the transaction node;
- monitor at least one attempt to access the object by at least one other process while the transaction node holds the lock;
- determine that the at least one attempt to access the object exceeds a first threshold number of attempts;
- responsive to determining that the at least one attempt to access the object exceeds a first threshold number of attempts, increase the time-to-expiration for the lock timer;
- determining, by the transaction node, that the lock timer has expired;
- and
- responsive to determining that the lock timer has expired, release the lock, by the transaction node.
Dependencies are inferred from the claim text.