8000 读已写入数据 by lpxxn · Pull Request #110 · Vonng/ddia · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

读已写入数据 #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ch5.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@

​ 因为滞后时间太长引入的不一致性,可不仅是一个理论问题,更是应用设计中会遇到的真实问题。本节将重点介绍三个由复制延迟问题的例子,并简述解决这些问题的一些方法。

### 读己之写
### 读已写入数据

​ 许多应用让用户提交一些数据,然后查看他们提交的内容。可能是用户数据库中的记录,也可能是对讨论主题的评论,或其他类似的内容。提交新数据时,必须将其发送给领导者,但是当用户查看数据时,可以从追随者读取。如果数据经常被查看,但只是偶尔写入,这是非常合适的。

5C32 Expand All @@ -209,7 +209,7 @@

**图5-3 用户写入后从旧副本中读取数据。需要写后读(read-after-write)的一致性来防止这种异常**

​ 在这种情况下,我们需要 **读写一致性(read-after-write consistency)**,也称为 **读己之写一致性(read-your-writes consistency)**【24】。这是一个保证,如果用户重新加载页面,他们总会看到他们自己提交的任何更新。它不会对其他用户的写入做出承诺:其他用户的更新可能稍等才会看到。它保证用户自己的输入已被正确保存。
​ 在这种情况下,我们需要 **读写一致性(read-after-write consistency)**,也称为 **读已写入一致性(read-your-writes consistency)**【24】。这是一个保证,如果用户重新加载页面,他们总会看到他们自己提交的任何更新。它不会对其他用户的写入做出承诺:其他用户的更新可能稍等才会看到。它保证用户自己的输入已被正确保存。

如何在基于领导者的复制系统中实现读后一致性?有各种可能的技术,这里说一些:

Expand Down
0