couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fli...@apache.org
Subject [couchdb-documentation] branch master updated: Suggested edit to make clear what a quorum actually represents. (#252)
Date Thu, 08 Mar 2018 09:20:36 GMT
This is an automated email from the ASF dual-hosted git repository.

flimzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git


The following commit(s) were added to refs/heads/master by this push:
     new 4eabf79  Suggested edit to make clear what a quorum actually represents. (#252)
4eabf79 is described below

commit 4eabf7978a61d4e4432cfd4f5e647179e39f3661
Author: Oliver Dain <opublic@dains.org>
AuthorDate: Thu Mar 8 01:20:34 2018 -0800

    Suggested edit to make clear what a quorum actually represents. (#252)
    
    * Suggested edit to make clear what a quorum actually represents.
    
    * Fix as per code review.
    
    * More changes per code review.
    
    * Fixed minor typos per PR
---
 src/cluster/theory.rst | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/cluster/theory.rst b/src/cluster/theory.rst
index 9558fe5..2c0945a 100644
--- a/src/cluster/theory.rst
+++ b/src/cluster/theory.rst
@@ -32,12 +32,21 @@ As you see in ``etc/default.ini`` there is a section called [cluster]
 When creating a database you can send your own values with request and
 thereby override the defaults in ``default.ini``.
 
-The number of copies of a document with the same revision that have to be read
-before CouchDB returns with a ``200`` is equal to a half of total copies of
-the document plus one. It is the same for the number of nodes that need to
-save a document before a write is returned with ``201``. If there are less
-nodes than that number, then ``202`` is returned. Both read and write numbers
-can be specified with a request as ``r`` and ``w`` parameters accordingly.
+In clustered operation, a quorum must be reached before CouchDB returns a
+``200`` for a fetch, or 201 for a write operation. A quorum is defined as one
+plus half the number of "relevant copies". "Relevant copies" is defined
+slightly differently for read and write operations.
+
+For read operations, the number of relevant copies is the number of
+currently-accessible shards holding the requested data, meaning that in the case
+of a failure or network partition, the number of relevant copies may be lower
+than the number of replicas in the cluster.  The number of read copies can be
+set with the rparameter.
+
+For write operations the number of relevant copies is always `n`, the number of
+replicas in the cluster.  For write operations, the number of copies can be set
+using the w parameter. If fewer than this number of nodes is available, a 202
+will be returned.
 
 We will focus on the shards and replicas for now.
 

-- 
To stop receiving notification emails like this one, please contact
flimzy@apache.org.

Mime
View raw message