docs: 修正不可重复读和幻读概念描述#2883
Open
LunaSpica wants to merge 1 commit into
Open
Conversation
调整不可重复读和幻读的定义描述,使其更准确区分两者。 - 不可重复读强调同一条记录在事务期间被其他事务修改或删除,导致再次读取时内容或存在性发生变化。 - 幻读强调同一范围条件查询多次执行时,返回的记录集合发生变化,例如新增或删除符合条件的记录。 优化描述,避免将记录级变化与范围查询结果变化混淆。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
调整不可重复读和幻读的定义描述,使其更准确区分两者。
优化描述,避免将记录级变化与范围查询结果变化混淆。
参考:
https://www.postgresql.org/docs/current/transaction-iso.html
nonrepeatable read
A transaction re-reads data it has previously read and finds that data has been modified by another transaction (that committed since the initial read).
phantom read
A transaction re-executes a query returning a set of rows that satisfy a search condition and finds that the set of rows satisfying the condition has changed due to another recently-committed transaction.