Skip to content

docs: 修正不可重复读和幻读概念描述#2883

Open
LunaSpica wants to merge 1 commit into
Snailclimb:mainfrom
LunaSpica:patch-4
Open

docs: 修正不可重复读和幻读概念描述#2883
LunaSpica wants to merge 1 commit into
Snailclimb:mainfrom
LunaSpica:patch-4

Conversation

@LunaSpica

Copy link
Copy Markdown
Contributor

调整不可重复读和幻读的定义描述,使其更准确区分两者。

  • 不可重复读强调同一条记录在事务期间被其他事务修改或删除,导致再次读取时内容或存在性发生变化。
  • 幻读强调同一范围条件查询多次执行时,返回的记录集合发生变化,例如新增或删除符合条件的记录。

优化描述,避免将记录级变化与范围查询结果变化混淆。

参考:
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.

调整不可重复读和幻读的定义描述,使其更准确区分两者。

- 不可重复读强调同一条记录在事务期间被其他事务修改或删除,导致再次读取时内容或存在性发生变化。
- 幻读强调同一范围条件查询多次执行时,返回的记录集合发生变化,例如新增或删除符合条件的记录。

优化描述,避免将记录级变化与范围查询结果变化混淆。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant