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 method, comprising:
- performing, at one or more computing devices:
- based at least in part on detecting, by a first reader of a plurality of data accessors which includes one or more readers and one or more writers, that a particular lock of a first collection of one or more locks associated with a first data object is held by another data accessor,
- using, by the first reader, after checking a blocking indicator, 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
- implementing, by the first reader, one or more read operations on the first data object, without acquiring the particular lock;
- and
- prior to implementing a write operation on the first data object by a first writer of the one or more writers,
- acquiring, by the first writer, one or more locks of the first collection of locks, and
- setting, by the first writer, the blocking indicator to prevent another reader from using the second lock to obtain read access to the first data object.
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 which includes one or more readers and one or more writers to:
- based at least in part on detecting that a particular lock of a first collection of one or more locks associated with a first data object is held by another data accessor,
- obtain, after checking a blocking indicator, read access to the first data object using a second lock associated with the first data object, wherein the second lock is not a member of the first collection;
- and
- implement one or more read operations on the first data object, without acquiring the particular lock;
- and
- cause a first writer of the one or more writers to, prior to implementing a write operation on the first data object,
- acquire one or more locks of the first collection of locks, and
- set the blocking indicator to prevent another reader from using the second lock to obtain read access to the first data object.
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 which includes one or more readers and one or more writers to:
- based at least in part on detecting that a particular lock of a first collection of one or more locks associated with a first data object is held by another data accessor,
- obtain, after checking a blocking indicator, read access to the first data object using a second lock associated with the first data object, wherein the second lock is not a member of the first collection;
- and
- implement one or more read operations on the first data object, without acquiring the particular lock;
- and
- cause a first writer of the one or more writers to, prior to implementing a write operation on the first data object,
- acquire one or more locks of the first collection of locks, and
- set the blocking indicator to prevent another reader from using the second lock to obtain read access to the first data object.
Dependencies are inferred from the claim text.