weblab-tw / ddia-study-group

Designing Data-Intensive Applications Study Group
36 stars 4 forks source link

第七章節:關於 快照隔離 MVCC 的版本問題 -Mason #79

Open 0x171-0 opened 1 year ago

0x171-0 commented 1 year ago

读已提交 的隔离级别,而不提供 快照隔离,那么保留一个对象的两个版本就足够了:提交的版本和被覆盖但尚未提交的版本。支持快照隔离的存储引擎通常也使用 MVCC 来实现 读已提交 隔离级别。一种典型的方法是 读已提交 为每个查询使用单独的快照,而 快照隔离 对整个事务使用相同的快照。

快照隔離使用一致性快照+事務 ID 機制達到多版本控制,所以每一個操作都是一個版本的意思嗎?

🥲 抱歉還沒空找解答,有空會補上

samwu4166 commented 1 year ago

SQL Server

Once snapshot isolation is enabled, updated row versions for each transaction must be maintained. Prior to SQL Server 2019, these versions were stored in tempdb. SQL Server 2019 introduces a new feature, Accelerated Database Recovery (ADR) which requires its own set of row versions.

ref: https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/snapshot-isolation-in-sql-server

jxiu0129 commented 1 year ago