Embodiments of the present application provide a
transaction processing method, a device, and a storage medium. For a
distributed transaction, it is proposed innovatively that exclusive locks are added to
data records involved in a read set of the
distributed transaction in a read phase; in a write phase, write operations for a write set can be directly executed based on these exclusive locks, and an exclusive lock on a related data
record can be released immediately after a write operation is completed. In the write phase, the exclusive locks added to the
data records can maintain the exclusivity of the
distributed transaction over these
data records, which can avoid the write operation abort problem in the write phase. That is, all write operations of the distributed transaction are bound to succeed, thereby ensuring the
atomicity of
distributed transaction processing. In addition, since the exclusive lock is released immediately after the write operation is completed, the lock-
holding time of the distributed transaction is only the time inherently required to execute
transaction logic of the distributed transaction, thereby greatly reducing the lock-
holding time of the distributed transaction, effectively increasing the
throughput for distributed transactions and improving the
transaction processing efficiency.