IP Library Granted Patent US 11,474,990
Granted Patent B2
US 11,474,990 · App. 16/521,131 · Granted Oct 18, 2022

Priority queue for exclusive locks

Inventor: Thomas Schaub (Villeneuve Loubet, FR)
Assignee: SAP SE
G06F16/2322G06F16/2343
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,474,990
App. No.
16/521,131
Granted
Oct 18, 2022
Kind
B2
Abstract

A system includes reception of a first request for a lock on a lock object, storage of a first entry associated with the first request and the lock object in a queue, determination of a first queue position associated with the first entry based on a first priority level of the first request and on a priority level of each of a plurality of entries in the queue associated with the lock object, determination of whether a predetermined expiration time associated with the first request has expired, and, if it is determined that the predetermined expiration time has expired, deletion of the first entry from the queue.

Claims (39)

1. A computing system comprising:

a storage device that comprises a queue that stores pending lock requests which have been received from one or more processes and which have not but are waiting to lock onto one or more data objects in a database, where locks on the one or more data objects are currently held by other users of the database; and

a processor configured to

receive a lock request from an application which identifies a target data object of the lock request which is stored in the database,

determine whether the lock request is a new based on whether a matching entry for the lock request currently exists in the queue;

in response to a determination that the lock request is new, determine whether another process holds a lock on the target data object, and in response to at least one other processing holding the lock, identify a queue position for the received lock request based on a priority of the received lock request,

store an entry corresponding to the received lock request among entries of the pending lock requests in the queue at the determined queue position, and

in response to determining to release the queued lock request, dequeue the queued lock request from the queue.

2. The computing system of claim 1 , wherein the processor is further configured to return an error notification to the application associated with the lock request when access to the target data object fails.

3. The computing system of claim 1 , wherein the queue comprises a queue table which stores an identifier of an application which owns the lock request of the target data object and a lock argument of the lock request.

4. The computing system of claim 3 , wherein the lock argument comprises an identifier of the target data object to be locked.

5. The computing system of claim 1 , wherein the processor further executes a queue engine which is configured to enqueue and dequeue the pending lock requests from the queue.

6. The computing system of claim 1 , wherein the processor is further configured to detect that the queued lock request has expired in response to the queued lock request being pending for greater than a predetermined waiting time and release the queued lock request in response to the detection.

7. The computing system of claim 1 , wherein the processor is further configured to shift one or more non-expired lock requests in the queue as a result of the dequeuing of the queued lock request.

8. The computing system of claim 1 , wherein the processor is configured to store an identification of a process that currently holds the lock on the target data object at a highest priority entry in the queue.

9. A method comprising:

implementing, via a storage device, a queue that stores pending lock requests which have been received from one or more processes and which have not but are waiting to access one or more data objects in a database, where locks on the one or more data objects are currently held by other users of the database;

receiving a lock request from an application which identifies a target data object of the lock request which is stored in the database;

determining whether the lock request is a new based on whether a matching entry for the lock request currently exists in the queue;

in response to a determination that the lock request is new, determining whether another process holds a lock on the target data object, and in response to at least one other processing holding the lock, identifying a queue position for the received lock request based on a priority of the received lock request;

storing an entry corresponding to the received lock request among entries of the pending lock requests in the queue at the determined queue position; and

in response to determining to release the queued lock request, dequeuing the queued lock request from the queue.

10. The method of claim 9 , further comprising returning an error notification to the application associated with the dequeued lock request when access to the target data object fails.

11. The method of claim 9 , wherein the queue comprises a queue table which stores an identifier of an application which owns the lock request of the target data object and a lock argument of the lock request.

12. The method of claim 11 , wherein the lock argument comprises an identifier of the target data object to be locked.

13. The method of claim 9 , further comprising executing a queue engine which is configured to enqueue and dequeue the pending lock requests from the queue.

14. The method of claim 9 , further comprising detecting that the queued lock request has expired in response to the queued lock request being pending for greater than a predetermined waiting time and releasing the queued lock request in response to the detection.

15. The method of claim 9 , further comprising shifting one or more non-expired lock requests in the queue as a result of the dequeuing of the queued lock request.

16. The method of claim 9 , further comprising storing an identification of a process that currently holds the lock on the target data object at a highest priority entry in the queue.

17. A non-transitory computer-readable medium storing instructions which when executed by a processor cause a computer to perform a method comprising:

implementing, via a storage device, a queue that stores pending lock requests which have been received from one or more processes and which have not but are waiting to access one or more data objects in a database, where locks on the one or more data objects are currently held by other users of the database;

receiving a lock request from an application which identifies a target data object of the lock request which is stored in the database;

determining whether the lock request is a new based on whether a matching entry for the lock request currently exists in the queue;

in response to a determination that the lock request is new, determining whether another process holds a lock on the target data object, and in response to at least one other processing holding the lock, identifying a queue position for the received lock request based on a priority of the received lock request;

storing an entry corresponding to the received lock request among entries of the pending lock requests at the determined queue position; and

in response to determining to release the queued lock request, dequeuing the queued lock request from the queue.

18. The non-transitory computer-readable medium of claim 17 , wherein the method further comprises returning an error notification to the application associated with the dequeued lock request when access to the target data object fails.

19. The non-transitory computer-readable medium of claim 17 , wherein the queue comprises a queue table which stores an identifier of an application which owns the lock request of the target data object and a lock argument of the lock request.

20. The non-transitory computer-readable medium of claim 19 , wherein the lock argument comprises an identifier of the target data object to be locked.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 9, 2021
From: SCHAUB, THOMAS
To: SAP SE
Reel/Frame 055889/0145 →
Continuity (2)
Continuation 14816588 · Aug 3, 2015
Related Publication 20190347250A1 · Nov 14, 2019