US 12,468,680 B2
Method for controlling transaction concurrency, electronic device, and readable storage medium
Jian Wang, Shenzhen (CN)
Assigned to SHENZHEN ZOLON TECHNOLOGY CO., LTD., Shenzhen (CN)
Appl. No. 18/725,727
Filed by SHENZHEN ZOLON TECHNOLOGY CO., LTD., Shenzhen (CN)
PCT Filed Oct. 18, 2022, PCT No. PCT/CN2022/125971
§ 371(c)(1), (2) Date Jun. 28, 2024,
PCT Pub. No. WO2023/124421, PCT Pub. Date Jul. 6, 2023.
Claims priority of application No. 202111679155.9 (CN), filed on Dec. 31, 2021.
Prior Publication US 2025/0068618 A1, Feb. 27, 2025
Int. Cl. G06F 7/00 (2006.01); G06F 16/23 (2019.01)
CPC G06F 16/2343 (2019.01) [G06F 16/2379 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method for controlling transaction concurrency, comprising:
creating a target record in response to a creation operation, and adding record header data comprising record lock information, state information, a creation version number, and a deletion version number for the target record, the record lock information being used to represent whether the target record is deleted, the state information being used to represent whether the target record is valid, the creation version number being used to represent a unique identifier of a transaction that creates the target record, and the deletion version number being used to represent a unique identifier of a transaction that deletes the target record;
obtaining a read operation for the target record, the read operation belonging to a first transaction, and the target record being a record created by a second transaction;
in response to the read operation, obtaining the record header data of the target record;
in response that the target record is in a valid state according to the state information, the target record is not deleted according to the record lock information, the deletion version number is null, and the creation version number is not equal to the unique identifier of the first transaction, determining whether the creation version number is in a transaction registration list;
in response that the creation version number is not in the transaction registration list, reading the target record; and
in response that the creation version number is in the transaction registration list, determining that the target record is unreadable to the first transaction.