US 12,346,303 B2
Transaction processing method and apparatus, computer device, and storage medium
Haixiang Li, Shenzhen (CN)
Assigned to Tencent Technology (Shenzhen) Company Limited, Shenzhen (CN)
Filed by Tencent Technology (Shenzhen) Company Limited, Shenzhen (CN)
Filed on Nov. 29, 2022, as Appl. No. 18/070,758.
Application 18/070,758 is a continuation of application No. PCT/CN2022/073455, filed on Jan. 24, 2022.
Claims priority of application No. 202110115847.4 (CN), filed on Jan. 28, 2021.
Prior Publication US 2023/0100223 A1, Mar. 30, 2023
Int. Cl. G06F 16/23 (2019.01)
CPC G06F 16/2322 (2019.01) [G06F 16/2365 (2019.01)] 14 Claims
OG exemplary drawing
 
1. A method for transaction processing, performed by a computer device, the method comprising:
obtaining a read set and a write set of a target transaction in response to a read-write operation of the target transaction;
determining a logical begin time and a logical end time of the target transaction in response to a validation instruction of the target transaction;
in response to the logical begin time and the logical end time conforming to a concurrent consistency level of the target transaction, to obtain an updated logical begin time:
obtaining to-be-written transaction information of a data item in the write set, the to-be-written transaction information being used for identifying a transaction that is modifying the data item;
in response to each piece of the to-be-written transaction information being null:
using the to-be-written transaction information as a transaction identifier of the target transaction;
updating the logical begin time to make the updated logical begin time greater than a maximum read transaction time stamp of the data item, the maximum read transaction time stamp representing a maximum value in logical end times of transactions that have read the data item;
adjusting the logical begin time based on an active transaction set in response to the updated logical begin time and the logical end time conforming to the concurrent consistency level of the target transaction, the active transaction set identifying transactions that have started but have not been committed; and
rolling back the target transaction in response to the updated logical begin time and the logical end time not conforming to the concurrent consistency level of the target transaction; and
rolling back the target transaction in response to any piece of the to-be-written transaction information being not null; and
committing the target transaction in response to the updated logical begin time being less than or equal to the logical end time.