摘要:
Read view是实现多版本并发控制(mvcc)中的一个重要的数据结构。Read view也可以称作是快照。其用来描述当前数据库中的存在的事务情况。因为数据的可见性与事务息息相关。
本文对其实现进行源码分析。
ReadView 和 MVCC
Read view是实现多版本并发控制(mvcc)中的一个重要的数据结构。Read view也可以称作是快照。其用来描述当前数据库中的存在的事务情况。因为数据的可见性与事务息息相关。
/*
-------------------------------------------------------------------------------
FACT A: Cursor read view on a secondary index sees only committed versions
-------
of the records in the secondary index or those versions of rows created
by transaction which created a cursor before cursor was created even
if transaction which created the cursor has changed that clustered index page.
PROOF: We must show that read goes always to the clustered inde