Font Size: a A A

Research And Implementation Of Transaction Processing Technology Based On TiDB

Posted on:2022-12-11Degree:MasterType:Thesis
Country:ChinaCandidate:X ShiFull Text:PDF
GTID:2518306764966669Subject:Computer Software and Application of Computer
Abstract/Summary:PDF Full Text Request
With the rapid development of computer technology and the Internet,the volume of data and the scale of users of network applications have shown explosive growth,and the traditional relational database has been unable to satisfy the current needs of massive data storage and transaction processing,so the distributed relational database is invented,of which the distributed transaction processing model and transaction consistency are the current research hotspots.The current distributed transaction model of most databases is still based on a two-phase commit protocol,which has problems such as long latency during transaction commit.In terms of transaction consistency,the transaction concurrency control protocols used by some databases do not reach the serializable isolation in order to ensure transaction processing performance,and errors may occur when transactions are executed concurrently,which may cause huge losses to enterprises in some scenarios.Therefore how to improve the processing performance of distributed transactions as much as possible while ensuring transaction consistency has become the core challenge facing distributed relational databases today.To address these issues,the thesis does a research on distributed transactions based on the Percolator distributed transaction model and the implementation of open source distributed relational database TiDB.In terms of transaction performance,the thesis investigates the design idea and execution process of Percolator,and proposes the in-memory locking mechanism and its recovery strategy.This mechanism transfers the locking and unlocking operations of Percolator from disk to memory while ensuring the atomicity of transactions,which reduces the number of disk IOs and the transaction processing latency.In the event of downtime,the data stored in the in-memory lock table is restored by replaying the Raft log to avoid loss of transaction state.In terms of transaction consistency,Percolator's isolation level is analysed and Point out the problems in the write-write conflict avoidance strategy.The thesis proposes the S-Peroclator protocol based on read-write conflict detection,and it is shown that the transaction scheduling sequence it produces is serialised.Finally,the thesis implements the two proposed improvement points based on TiDB and TiKV.Experiments show that with the inclusion of a memory-locked table mechanism,the latency of transaction processing are reduced by 5-7%.The use of the S-Percolator protocol brought transaction concurrency control to a serialisable isolation level without any significant impact on database performance.
Keywords/Search Tags:Distributed Transaction, Snapshot Isolation, Serializable, Concurrency Control, Tow-Phase Commit
PDF Full Text Request
Related items