Systems and methods for supporting transactional message handling
First Claim
1. A method performed by a system having at least a processor and a memory therein, the method comprising:
- enqueuing a message into a message queue framework, the message specifying a transaction requiring at least a row to be inserted into a database system;
inserting the row into the database system, wherein a status for the row inserted into the database system remains pending in the message queue framework absent initiation of a commit operation for the row;
initiating the commit operation for the row inserted into the database system upon insertion of the row into the database system regardless of whether any further processing occurs;
requesting a lock on the row inserted into the database system;
determining the transaction failed resulting in the enqueued message becoming an orphaned transaction within the message queue framework which will not be consumed, wherein determining the transaction failed is based on whether the lock requested on the row is obtained or denied and based further on whether the status for the row is pending or ready in the message queue framework; and
performing an orphaned transaction clean up operation including at least discarding the enqueued message by removing the row from the database system and committing the deletion of the row from the database system; and
wherein the database system embodies a multi-tenant database system, the multi-tenant database system having elements of hardware and software that are shared by a plurality of separate and distinct customer organizations, each of the separate and distinct customer organizations being remotely located from the multi-tenant database system.
1 Assignment
0 Petitions
Accused Products
Abstract
In accordance with embodiments disclosed herein, there are provided methods, systems, and apparatuses including, for supporting transactional message handling in an on-demand service environment including, for example: enqueuing a message specifying a transaction to be processed via a host organization; inserting a row into a database of the host organization associating the message with a status of pending, wherein the row is autocommitted to the database upon insertion; updating the status for the row to ready if a commit operation for the transaction is initiated; requesting a lock on the row; and performing final processing for the transaction based on the status for the message and based further on whether the lock is obtained for the row. Final processing may include, for example, a transaction roll back, a transaction commit, a transaction requeue, a termination of transaction processing, or an orphaned transaction clean up.
-
Citations
20 Claims
-
1. A method performed by a system having at least a processor and a memory therein, the method comprising:
-
enqueuing a message into a message queue framework, the message specifying a transaction requiring at least a row to be inserted into a database system; inserting the row into the database system, wherein a status for the row inserted into the database system remains pending in the message queue framework absent initiation of a commit operation for the row; initiating the commit operation for the row inserted into the database system upon insertion of the row into the database system regardless of whether any further processing occurs; requesting a lock on the row inserted into the database system; determining the transaction failed resulting in the enqueued message becoming an orphaned transaction within the message queue framework which will not be consumed, wherein determining the transaction failed is based on whether the lock requested on the row is obtained or denied and based further on whether the status for the row is pending or ready in the message queue framework; and performing an orphaned transaction clean up operation including at least discarding the enqueued message by removing the row from the database system and committing the deletion of the row from the database system; and wherein the database system embodies a multi-tenant database system, the multi-tenant database system having elements of hardware and software that are shared by a plurality of separate and distinct customer organizations, each of the separate and distinct customer organizations being remotely located from the multi-tenant database system. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A non-transitory computer readable storage medium having instructions stored thereon that, when executed by a system having a processor and memory therein, the instructions cause the system to perform operations comprising:
-
enqueuing a message into a message queue framework, the message specifying a transaction requiring at least a row to be inserted into a database system; inserting the row into the database system, wherein a status for the row inserted into the database system remains pending in the message queue framework absent initiation of a commit operation for the row; initiating the commit operation for the row inserted into the database system upon insertion of the row into the database system regardless of whether any further processing occurs; requesting a lock on the row inserted into the database system; determining the transaction failed resulting in the enqueued message becoming an orphaned transaction within the message queue framework which will not be consumed, wherein determining the transaction failed is based on whether the lock requested on the row is obtained or denied and based further on whether the status for the row is pending or ready in the message queue framework; and performing an orphaned transaction clean up operation including at least discarding the enqueued message by removing the row from the database system and committing the deletion of the row from the database system; and wherein the database system embodies a multi-tenant database system, the multi-tenant database system having elements of hardware and software that are shared by a plurality of separate and distinct customer organizations, each of the separate and distinct customer organizations being remotely located from the multi-tenant database system. - View Dependent Claims (19)
-
-
20. A system comprising:
-
a processor to execute instructions; a request interface to receive a request from a client device; a message broker to enqueue a message into a message queue framework, the message specifying a transaction requiring at least a row to be inserted into a database system; the message queue framework to insert the row into the database system, wherein a status for the row inserted into the database system remains pending in the message queue framework absent initiation of a commit operation for the row; the message queue framework to initiate the commit operation for the row inserted into the database system upon insertion of the row into the database system regardless of whether any further processing occurs; a worker thread to request a lock on the row inserted into the database system; the worker thread to determine the transaction failed resulting in the enqueued message becoming an orphaned transaction within the message queue framework which will not be consumed, wherein determining the transaction failed is based on whether the lock requested on the row is obtained or denied and based further on whether the status for the row is pending or ready in the message queue framework; and the message queue framework to perform an orphaned transaction clean up operation including at least discarding the enqueued message by removing the row from the database system and committing the deletion of the row from the database system; and wherein the database system embodies a multi-tenant database system, the multi-tenant database system having elements of hardware and software that are shared by a plurality of separate and distinct customer organizations, each of the separate and distinct customer organizations being remotely located from the multi-tenant database system.
-
Specification