You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2023/06/11 07:33:53 UTC

[couchdb] 01/01: clarify default quorum calculation

This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch clarify-quorum
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit bb1216593531cdb821a1c9fb0d1442a275799ea8
Author: Robert Newson <rn...@apache.org>
AuthorDate: Sun Jun 11 08:33:35 2023 +0100

    clarify default quorum calculation
---
 src/docs/src/cluster/sharding.rst | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/docs/src/cluster/sharding.rst b/src/docs/src/cluster/sharding.rst
index d7bc3e262..55243805e 100644
--- a/src/docs/src/cluster/sharding.rst
+++ b/src/docs/src/cluster/sharding.rst
@@ -93,10 +93,11 @@ include itself. The coordinating node sends a response to the client
 once a `quorum
 <https://en.wikipedia.org/wiki/Quorum_(distributed_computing)>`__ of
 database nodes have responded; 2, by default. The default required size
-of a quorum is equal to ``r=w=((n+1)/2)`` where ``r`` refers to the size
-of a read quorum, ``w`` refers to the size of a write quorum, and ``n``
-refers to the number of replicas of each shard. In a default cluster where
-``n`` is 3, ``((n+1)/2)`` would be 2.
+of a quorum is equal to ``r=w=((n div 2) + 1)`` where ``r`` refers to the size
+of a read quorum, ``w`` refers to the size of a write quorum, ``n``
+refers to the number of replicas of each shard, and ``div`` is integer division,
+rounding down. In a default cluster where
+``n`` is 3, ``((n div 2) + 1)`` would be 2.
 
 .. note::
     Each node in a cluster can be a coordinating node for any one