mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-28 16:07:06 +00:00
minor fixes
This commit is contained in:
@@ -174,7 +174,7 @@ K2V provides the following consistency guarantees:
|
|||||||
successfully), a subsequent read is guaranteed to contain the value that was
|
successfully), a subsequent read is guaranteed to contain the value that was
|
||||||
written.
|
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).
|
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
|
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
|
request writing 1 is performed. Doing two subsequent reads concurrently with the
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ impl K2VRpcHandler {
|
|||||||
|
|
||||||
if let Some(v) = &resp {
|
if let Some(v) = &resp {
|
||||||
if monotonic_read == K2VMonotonicRead::Monotonic && not_all_same {
|
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 {
|
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 {
|
if items.len() < resps_nb {
|
||||||
to_repair.insert(item_key.clone());
|
to_repair.insert(item_key.clone());
|
||||||
}
|
}
|
||||||
@@ -413,7 +413,7 @@ impl K2VRpcHandler {
|
|||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|k| new_items.get(&k).unwrap())
|
.map(|k| new_items.get(&k).unwrap())
|
||||||
.collect();
|
.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 {
|
if new_items.is_empty() && has_seen_marker {
|
||||||
|
|||||||
+1
-1
@@ -376,7 +376,7 @@ impl<F: TableSchema, R: TableReplication> Table<F, R> {
|
|||||||
|
|
||||||
if let Some(ret_entry) = &ret {
|
if let Some(ret_entry) = &ret {
|
||||||
if monotonic_read && not_all_same {
|
if monotonic_read && not_all_same {
|
||||||
self.repair_on_read(&who, &[&ret_entry]).await?;
|
self.repair_on_read(&who, &[ret_entry]).await?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user