aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/replication_mode.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-12-07 14:27:53 +0100
committerAlex Auvolat <alex@adnab.me>2023-12-07 14:51:20 +0100
commit9cecea64d4509e95ac9793b29c947e2ecf9bb0b8 (patch)
tree38e9f105004ceea86e064892aab5f20f9c3c4f46 /src/rpc/replication_mode.rs
parentaa59059a910eb6e1e824b84413a66909d697ef8a (diff)
downloadgarage-9cecea64d4509e95ac9793b29c947e2ecf9bb0b8.tar.gz
garage-9cecea64d4509e95ac9793b29c947e2ecf9bb0b8.zip
layout: allow sync update tracker to progress with only quorums
Diffstat (limited to 'src/rpc/replication_mode.rs')
-rw-r--r--src/rpc/replication_mode.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rpc/replication_mode.rs b/src/rpc/replication_mode.rs
index e244e063..2f7e2fec 100644
--- a/src/rpc/replication_mode.rs
+++ b/src/rpc/replication_mode.rs
@@ -54,4 +54,11 @@ impl ReplicationMode {
Self::ThreeWayDangerous => 1,
}
}
+
+ pub fn is_read_after_write_consistent(&self) -> bool {
+ match self {
+ Self::None | Self::TwoWay | Self::ThreeWay => true,
+ _ => false,
+ }
+ }
}