diff --git a/doc/drafts/k2v-spec.md b/doc/drafts/k2v-spec.md index 32be024d..2db49a6b 100644 --- a/doc/drafts/k2v-spec.md +++ b/doc/drafts/k2v-spec.md @@ -174,7 +174,7 @@ K2V provides the following consistency guarantees: successfully), a subsequent read is guaranteed to contain the value that was written. -**Monotonic Reads**. Two sequencial reads will return values in an order that is +**Monotonic Reads**. Two sequential reads will return values in an order that is consistent with the order in which they are written (e.g. by concurrent writes). For example, consider a scenario where a value is set initially set to 0 and a request writing 1 is performed. Doing two subsequent reads concurrently with the diff --git a/src/model/k2v/rpc.rs b/src/model/k2v/rpc.rs index 09931abd..7d2bede3 100644 --- a/src/model/k2v/rpc.rs +++ b/src/model/k2v/rpc.rs @@ -279,7 +279,7 @@ impl K2VRpcHandler { if let Some(v) = &resp { if monotonic_read == K2VMonotonicRead::Monotonic && not_all_same { - self.item_table.repair_on_read(&nodes, &[&v]).await?; + self.item_table.repair_on_read(&nodes, &[v]).await?; } } @@ -387,7 +387,7 @@ impl K2VRpcHandler { } } for (item_key, items) in all_items { - // Only some nodes store this item; we must propage it during repair + // Only some nodes store this item; we must propagate it during repair if items.len() < resps_nb { to_repair.insert(item_key.clone()); } @@ -413,7 +413,7 @@ impl K2VRpcHandler { .into_iter() .map(|k| new_items.get(&k).unwrap()) .collect(); - self.item_table.repair_on_read(&nodes, &to_repair).await? + self.item_table.repair_on_read(&nodes, &to_repair).await?; } if new_items.is_empty() && has_seen_marker { diff --git a/src/table/table.rs b/src/table/table.rs index d6f4018a..5b723e7f 100644 --- a/src/table/table.rs +++ b/src/table/table.rs @@ -376,7 +376,7 @@ impl Table { if let Some(ret_entry) = &ret { if monotonic_read && not_all_same { - self.repair_on_read(&who, &[&ret_entry]).await?; + self.repair_on_read(&who, &[ret_entry]).await?; } }