A transactional task processing method and device
A task processing, transaction-based technology, applied in special data processing applications, database updates, structured data retrieval, etc., can solve problems such as dependence on business data, slow execution, and difficulty in using database lock mechanisms.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0049] Embodiment 1 provides a method for processing transactional tasks in the system. The specific flow chart of the method is shown in figure 1 shown, including the following steps:
[0050] Step 101: Receive the current transactional task.
[0051]The distributed system receives the current transactional tasks. In a distributed system, when a computer needs to perform a series of indivisible operations on the database, it needs to send tasks to the distributed system. Here, the whole composed of a series of indivisible operations is called a current transactional task, and the current transactional task refers to a transactional task that processes the database.
[0052] There are a large number of transactional tasks in Alipay. The distributed system executes these tasks regularly according to the set time rules. According to the set time rules, when the time to execute a certain task comes, the distributed system will start the task. The processing flow of the task. ...
Embodiment 2
[0071] Embodiment 2 provides a transactional task processing method for processing transactional tasks. The specific flow chart of the method is shown in figure 2 shown, including the following steps:
[0072] Step 201: Receive the current transactional task.
[0073] Step 202: Query the status attribute of the lock object of the database corresponding to the current transactional task according to the current transactional task, if the status attribute is displayed as completed, then execute step 2021, if the status attribute is displayed as running, then execute Step 2022.
[0074] The lock object may include a task identification attribute, a status attribute, a start time attribute and a timeout threshold attribute, the status attribute is used to display the running state of the lock object, and the start time attribute is used to record when the current transactional task is executed The time, the timeout threshold attribute is used to set the maximum time available ...
Embodiment 3
[0082] In Embodiment 2, it is mentioned that the current transactional task is submitted according to the execution status. In fact, before submitting the current transactional task, the embodiment may also include judging whether the execution time of the current transactional task is greater than the value of the timeout threshold attribute. Therefore, Embodiment 3 of the present application is constituted. Compared with Embodiment 2, Embodiment 3 of the present application has the same steps except step 203 . Reference attached image 3 , step 203 of Embodiment 2 is changed in this embodiment to:
[0083] Step 3031: Determine whether the execution time of the current transactional task is greater than the value of the timeout threshold attribute, if yes, execute step 3032, otherwise execute step 3033.
[0084] Step 3032: Roll back the current transactional task.
[0085] Step 3033: Submit the current transactional task.
[0086] When the execution of the current transact...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


