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/01/23 21:03:06 UTC
[GitHub] jjrodrig commented on issue #603: Error 500 when creating a db below quorum
jjrodrig commented on issue #603: Error 500 when creating a db below quorum
URL: https://github.com/apache/couchdb/issues/603#issuecomment-359929477
I've also noticed this issue during my cluster testing.
I think the problem is here https://github.com/apache/couchdb/blob/d16f2db901c9b3b24c7189acfec35ec42895bd25/src/fabric/src/fabric_db_create.erl#L143
Accepted is returned if the number of responses are at least (W div 2 + 1). If you get less than this value an internal server error is returned.
In a three node cluster where the quorum is 2, you need at least 2 responses in order to get accepted as response which is the same number you need for a 200 status code response.
This seems not to be consistent with this description in the documentation "[11.2 Theory](http://docs.couchdb.org/en/2.1.1/cluster/theory.html)" which applies to document reads/writes not to db creation but I expected a similar behaviour .
> 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.
W div 2 + 1, seems to be the default quorum required for a 200 status code, not for a 202 status code response
----------------------------------------------------------------
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