Skip to content

Commit 1bbddfa

Browse files
committed
M src/list/raxos/def-Mergeable-History-2.md
1 parent f6be1fd commit 1bbddfa

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/list/raxos/def-Mergeable-History-2.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,20 @@ def-Mergeable-History-2
2121

2222
单副本,或单机环境中, 对整个系统的读是一个简单的操作: `fn read(ptime: PTime) -> History`.
2323
但是在多副本的分布式环境中, 读会读到多个副本, 读操作可以看做这样一个函数: `fn read(ptime: PTime, node_set: Vec<Node>) -> Vec<History>`:
24-
它从多个节点`node_set`中读 History 副本, 并返回一个 History 的集合.
24+
它从多个节点`node_set`中读 History 副本, 并返回一个 History 的集合.
25+
26+
27+
mergeable 比较方法:
28+
29+
30+
给定的History, h 和 一个时刻T,
31+
32+
// TODO:
33+
根据 [[def-Mergeable-History]]
34+
35+
对h中的每个待加入的时间Tᵢ,:
36+
- 如果存在`Tᵢ < T`, 则h是不可写的, 因为一个read请求会选择包含T的history而舍弃Tᵢ
37+
- 如果不存在`Tᵢ < T`, 则h是可写的,因为一个read操作会把h包含在自己的结果中.
38+
39+
40+

0 commit comments

Comments
 (0)