IP Library Granted Patent US 12681914
Granted Patent B2
US 12681914 · App. 18/115,663 · Granted Jul 14, 2026

Method and system to efficiently abort a database transaction

Inventors: Sarat Inuguri (Milpitas, CA); Kishy Kumar (Santa Clara, CA); Ajit Mylavarapu (Mountain View, CA); Sue Kyong Lee (Emerald Hills, CA); Manoj Dhanapal (Seattle, WA); Subrata Sen (Mumbai, IN); Tirthankar Lahiri (Los Altos Hills, CA); Sanjay Singh (Redwood City, CA); Mukul Pandey (Bengaluru, IN)
Assignee: Oracle International Corporation
G06F16/2343G06F9/4881
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 12681914
App. No.
18/115,663
Granted
Jul 14, 2026
Kind
B2
Abstract

Disclosed is an approach to autonomously abort a lower priority transaction that is blocking a higher priority transaction, where the lower priority transaction is holding a lock on a resource for which there is contention. Some approaches also provide an efficient way to implement identification of a blocker transaction, which drastically reduces the response time to abort the blocker transaction.

Claims (45)

1 . A computer implemented method executed in a computerized database system to abort a database transaction, the computer-implemented method comprising:

configuring a first transaction priority level for a first database transaction comprising one or more computer operations executable in the computerized database system;

configuring a second transaction priority level for a second database transaction comprising one or more computer operations executable in the computerized database system, the first and second database transactions both requiring the same one or more rows within a table of a database of the computerized database system;

identifying that the first database transaction is blocking the second database transaction, wherein the first database transaction, by execution of a computer operation of the computerized database system, at least partially executes and is blocking the second database transaction from executing by holding a lock on the one or more rows within the table of the database;

determining if an abort condition of the second transaction priority level is higher than the first transaction priority level is met; and

aborting the first database transaction based at least in part on the abort condition being met, wherein aborting the first database transaction comprises executing a computer operation in the computerized database system that releases the lock held by the first database transaction to the one or more rows in the database table.

2 . The computer-implemented method of claim 1 , wherein the abort condition is based upon a time wait target for the second transaction priority level, wherein the abort condition is met upon expiration of the time wait target.

3 . The computer-implemented method of claim 1 , wherein a priority level for a database transaction is imposed by configuring the priority level for a session including the database transaction, and the priority level is inherited by the database transaction that is within the session.

4 . The computer-implemented method of claim 1 , wherein the first transaction priority level and the second transaction priority level are automatically configured based at least upon at least one of a service characteristic, a user characteristic, a data characteristic, or a query characteristic.

5 . The computer-implemented method of claim 1 , wherein blocker transaction identification is performed by at least one of querying a lock manager of the database system or checking a transaction table of the database system.

6 . The computer-implemented method of claim 1 , wherein a rule manager of the database system is consulted to determine whether the abort condition is met, the abort condition corresponding to a rule managed by the rule manager.

7 . The method of claim 1 , wherein the first database transaction is aborted by performing at least one computer operation to execute a session kill, a transaction abort, a voluntary abort, or a forced abort.

8 . The computer-implemented method of claim 1 , wherein the second database transaction subsequently accesses a row that was previously locked by the lock held by the first database transaction.

9 . The computer-implemented method of claim 1 , wherein the database comprises a relational database, and computer operations are executed using structured query language (SQL).

10 . The computer-implemented method of claim 6 , wherein rules managed by the rule manager govern when a blocking database transaction can be autonomously aborted in favor of higher priority database transaction.

11 . The computer-implemented method of claim 1 , wherein the first database transaction self-aborts based at least in part on the abort condition of the second transaction priority level being higher than the first transaction priority level being met.

12 . The computer-implemented method of claim 1 , the database of the computerized database system comprising a transactions table comprising respective columns for respective transaction entries identifying respective priority levels for respective transactions.

13 . A non-transitory computer program product embodied on a computer usable medium, the non-transitory computer readable medium having stored thereon a sequence of instructions which, when executed by a processor causes the processor to execute actions in a computerized database system to abort a database transaction, the actions comprising:

configuring a first transaction priority level for a first database transaction comprising one or more computer operations executable in the computerized database system;

configuring a second transaction priority level for a second database transaction comprising one or more computer operations executable in the computerized database system, the first and second database transactions both requiring the same one or more rows within a table of a database of the computerized database system;

identifying that the first database transaction is blocking the second database transaction, wherein the first database transaction, by execution of a computer operation of the computerized database system, at least partially executes and is blocking the second database transaction from executing by holding a lock on the one or more rows within the table of the database;

determining if an abort condition of the second transaction priority level is higher than the first transaction priority level is met; and

aborting the first database transaction based at least in part on the abort condition being met, wherein aborting the first database transaction comprises executing a computer operation in the computerized database system that releases the lock held by the first database transaction to the one or more rows in the database table.

14 . The non-transitory computer program product of claim 13 , wherein the abort condition is based upon a time wait target for the second transaction priority level, wherein the abort condition is met upon expiration of the time wait target.

15 . The non-transitory computer program product of claim 13 , wherein a priority level for a database transaction is imposed by configuring the priority level for a session including the database transaction, and the priority level is inherited by the database transaction that is within the session.

16 . The non-transitory computer program product of claim 13 , wherein the first transaction priority level and the second transaction priority level are automatically configured based at least upon at least one of a service characteristic, a user characteristic, a data characteristic, or a query characteristic.

17 . The non-transitory computer program product of claim 13 , wherein blocker transaction identification is performed by at least one of querying a lock manager of the database system or checking a transaction table of the database system.

18 . The non-transitory computer program product of claim 13 , wherein a rule manager of the database system is consulted to determine whether the abort condition is met, the abort condition corresponding to a rule managed by the rule manager.

19 . The non-transitory computer program product of claim 13 , wherein the first database transaction is aborted by performing at least one computer operation to execute a session kill, a transaction abort, a voluntary abort, or a forced abort.

20 . The non-transitory computer program product of claim 13 , wherein the second database transaction subsequently accesses a row that was previously locked by the lock held by the first database transaction.

21 . A computer-based system, comprising:

a computer processor to execute a set of program code instructions;

a memory to hold the program code instructions, in which the program code instructions comprises program code for executing a process to abort a database transaction by

configuring a first transaction priority level for a first database transaction comprising one or more computer operations executable in the computerized database system;

configuring a second transaction priority level for a second database transaction comprising one or more computer operations executable in the computerized database system, the first and second database transactions both requiring the same one or more rows within a table of a database;

identifying that the first database transaction is blocking the second database transaction, wherein the first database transaction, by execution of a computer operation of the computerized database system, at least partially executes and is blocking the second database transaction from executing by holding a lock on the one or more rows within the table of the database of the computerized database system;

determining if an abort condition of the second transaction priority level is higher than the first transaction priority level is met; and

aborting the first database transaction based at least in part on the abort condition being met, wherein aborting the first database transaction comprises executing a computer operation in the computerized database system that releases the lock held by the first database transaction to the one or more rows in the database table.

22 . The computer-based system of claim 21 , wherein the abort condition is based upon a time wait target for the second transaction priority level, wherein the abort condition is met upon expiration of the time wait target.

23 . The computer-based system of claim 21 , wherein a priority level for a database transaction is imposed by configuring the priority level for a session including the database transaction, and the priority level is inherited by the database transaction that is within the session.

24 . The computer-based system of claim 21 , wherein the first transaction priority level and the second transaction priority level are automatically configured based at least upon at least one of a service characteristic, a user characteristic, a data characteristic, or a query characteristic.

25 . The computer-based system of claim 21 , wherein blocker transaction identification is performed by at least one of querying a lock manager of the database system or checking a transaction table of the database system.

26 . The computer-based system of claim 21 , wherein a rule manager of the database system is consulted to determine whether the abort condition is met, the abort condition corresponding to a rule managed by the rule manager.

27 . The computer-based system of claim 21 , wherein the first database transaction is aborted by performing at least one computer operation to execute a session kill, a transaction abort, a voluntary abort, or a forced abort.

28 . The computer-based system of claim 21 , wherein the second database transaction subsequently accesses a row that was previously locked by the lock held by the first database transaction.