You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/03/08 09:20:36 UTC

[GitHub] flimzy closed pull request #252: Suggested edit to make clear what a quorum actually represents.

flimzy closed pull request #252: Suggested edit to make clear what a quorum actually represents.
URL: https://github.com/apache/couchdb-documentation/pull/252
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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.
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services