Global secondary path locking technique enabling high read concurrency for read-mostly workloads
AssigneeOracle International Corporation
InventorsAlex Kogan, David Dice
Life of this patent
Estimating the term…
Abstract
A reader of a set of data accessors that includes readers and writer detects that a particular lock of a first collection of non-global locks associated with a data object of a computing environment is held by another accessor. After checking a blocking indicator, the reader uses a second lock (which is not part of the first collection) to obtain read access to the data object and implements its reads without acquiring the particular lock. Prior to implementing a write on the data object, a writer acquires at least some locks of the first collection, and sets the blocking indicator to prevent readers from using the second lock to obtain read access to the data object.
Claims20
A computer-implemented method, comprising:
- determining, by a first reader of a plurality of data accessors, whether a particular lock of a first collection of one or more locks associated with a first data object is held by another data accessor;
- based at least in part on determining that the particular lock is held by the other data accessor:
- utilizing, by the first reader, after checking a blocking indicator different from the particular lock to determine that read access is permitted for the first data object, a second lock associated with the first data object to obtain read access to the first data object, wherein the second lock is not a member of the first collection, and wherein the blocking indicator indicates whether the first reader is prevented from utilizing the second lock to obtain read access to the first data object;
- and
- implementing, by the first reader, one or more read operations on the first data object, without acquiring the particular lock;
- and
- based at least in part on determining that the particular lock is not held by the other data accessor, implementing the one or more read operations on the first data object subsequent to acquiring the particular lock.
A system, comprising:
- one or more computing devices;
- wherein the one or more computing devices include instructions that upon execution on or across one or more processors cause a first reader of a plurality of data accessors to:
- determine whether a particular lock of a first collection of one or more locks associated with a first data object is held by another data accessor;
- based at least in part on determining that the particular lock is held by the other data accessor:
- utilize, after checking a blocking indicator different from the particular lock to determine that read access is permitted for the first data object, a second lock associated with the first data object to obtain read access to the first data object, wherein the second lock is not a member of the first collection, and wherein the blocking indicator indicates whether the first reader is prevented from utilizing the second lock to obtain read access to the first data object;
- and
- implement one or more read operations on the first data object, without acquiring the particular lock;
- and
- based at least in part on determining that the particular lock is not held by the other data accessor, implement the one or more read operations on the first data object subsequent to acquiring the particular lock.
One or more non-transitory computer-accessible storage media storing program instructions that when executed on or across one or more processors:
- cause a first reader of a plurality of data accessors to:
- determine whether a particular lock of a first collection of one or more locks associated with a first data object is held by another data accessor;
- based at least in part on determining that the particular lock is held by the other data accessor:
- utilize, after checking a blocking indicator different from the particular lock to determine that read access is permitted for the first data object, a second lock associated with the first data object to obtain read access to the first data object, wherein the second lock is not a member of the first collection, and wherein the blocking indicator indicates whether the first reader is prevented from utilizing the second lock to obtain read access to the first data object;
- and
- implement one or more read operations on the first data object, without acquiring the particular lock;
- and
- based at least in part on determining that the particular lock is not held by the other data accessor, implement the one or more read operations on the first data object subsequent to acquiring the particular lock.
Dependencies are inferred from the claim text.