Insert consistency level quorum docs error

56 views
Skip to first unread message

Filip Kostecki

unread,
Sep 5, 2022, 6:53:04 AM9/5/22
to DataStax Python Driver for Apache Cassandra User Mailing List
In cassandra.__init__.py in class ConsistencyLevel(object): quorum is described in docstring that ceil(RF/2) replicas must respond, which is not true, right?
QUORUM = 4
"""
``ceil(RF/2)`` replicas must respond to consider the operation a success
""" 
 
I checked this on 3 node cluster with RF=2 with QUORUM, where ceil(2/2) = 1. I turned off one node and got this error message:
cassandra.cluster.NoHostAvailable: ('Unable to complete the operation against any hosts', {<Host: my_ip:9042 datacenter1>: Unavailable('Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level for cl QUORUM. Requires 2, alive 1" info={\'consistency\': \'QUORUM\', \'required_replicas\': 2, \'alive_replicas\': 1}')})
QUORUM is RF / 2 + 1, right? Not ceil(RF/2). If so docstring should be fixed.





Bret McGuire

unread,
Sep 7, 2022, 2:00:32 PM9/7/22
to DataStax Python Driver for Apache Cassandra User Mailing List, filip.k...@dealavo.com
   Wow, nice catch!  That docstring has been around for some time.

   You are correct, that should read "ceil(RF/2) + 1 replicas must respond...".  I'll make the change so that it will be included in the next release.

   Thanks!

  - Bret -

Reply all
Reply to author
Forward
0 new messages