diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-15 08:05:18 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-15 08:05:18 +0200 |
commit | 6558c158633a2a6ce8141189cab2a5e992d520cf (patch) | |
tree | 7a21f1cc5b1ad62d1ebec325653b03e8e9574f79 | |
parent | afad62939e071621666ca7255f7164f92c4475bb (diff) | |
download | garage-6558c158633a2a6ce8141189cab2a5e992d520cf.tar.gz garage-6558c158633a2a6ce8141189cab2a5e992d520cf.zip |
decrease write quorumhotfix/1.0.0-rc1-red-ftr-wquorum
-rw-r--r-- | src/table/replication/fullcopy.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/table/replication/fullcopy.rs b/src/table/replication/fullcopy.rs index 1e52bb47..39e29580 100644 --- a/src/table/replication/fullcopy.rs +++ b/src/table/replication/fullcopy.rs @@ -43,13 +43,10 @@ impl TableReplication for TableFullReplication { } fn write_quorum(&self) -> usize { let nmembers = self.system.cluster_layout().current().all_nodes().len(); - - let max_faults = if nmembers > 1 { 1 } else { 0 }; - - if nmembers > max_faults { - nmembers - max_faults - } else { + if nmembers < 3 { 1 + } else { + nmembers.div_euclid(2) + 1 } } |