Merged
Conversation
第一处 原文: > However, read committed does not prevent the race condition between two > counter increments in Figure 7-1. In this case, the second write happens after the > first transaction has committed, so it’s not a dirty write. It’s still incorrect, but for > a different reason—in **“Preventing Lost Updates”** on page 242 we will discuss how > to make such counter increments safe. 翻译: > 但是,读已提交并不能防止 [图 7-1](https://github.com/Vonng/ddia/blob/master/img/fig7-1.png) 中两个计数器增量之间的竞争状态。在这种情况下,第二次写入发生在第一个事务提交后,所以它不是一个脏写。这仍然是不正确的,但是出于不同的原因,在 **“[防止更新丢失](https://github.com/Vonng/ddia/blob/master/ch7.md#%E9%98%B2%E6%AD%A2%E4%B8%A2%E5%A4%B1%E6%9B%B4%E6%96%B0)”** 中将讨论如何使这种计数器增量安全。 -------------- 第二处 原文: > **Lost updates** > Two clients concurrently perform a read-modify-write cycle. One overwrites the > other’s write without incorporating its changes, so data is lost. Some implemen‐ > tations of snapshot isolation prevent this anomaly automatically, while others > require a manual lock (SELECT FOR UPDATE). 翻译: > **更新丢失** > 两个客户端同时执行 读取 - 修改 - 写入序列。其中一个写操作,在没有合并另一个写入变更情况下,直接覆盖了另一个写操作的结果。所以导致数据丢失。快照隔离的一些实现可以自动防止这种异常,而另一些实现则需要手动锁定(SELECT FOR UPDATE)。
Collaborator
|
Thanks for your contribution! |
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.
第一处
原文:
翻译:
第二处
原文:
翻译: