default CL is now LOCAL_QUORUM

PYTHON-416
This commit is contained in:
Adam Holmberg
2015-10-09 13:03:14 -05:00
parent 7dbe87b39a
commit 97bf563b7e
3 changed files with 14 additions and 3 deletions

View File

@@ -1474,13 +1474,17 @@ class Session(object):
.. versionadded:: 2.0.0
"""
default_consistency_level = ConsistencyLevel.ONE
default_consistency_level = ConsistencyLevel.LOCAL_QUORUM
"""
The default :class:`~ConsistencyLevel` for operations executed through
this session. This default may be overridden by setting the
:attr:`~.Statement.consistency_level` on individual statements.
.. versionadded:: 1.2.0
.. versionchanged:: 3.0.0
default changed from ONE to LOCAL_QUORUM
"""
max_trace_wait = 2.0

View File

@@ -98,6 +98,9 @@
.. autoattribute:: default_timeout
.. autoattribute:: default_consistency_level
:annotation: = LOCAL_QUORUM
.. autoattribute:: row_factory
.. autoattribute:: default_fetch_size

View File

@@ -327,8 +327,12 @@ The consistency level used for a query determines how many of the
replicas of the data you are interacting with need to respond for
the query to be considered a success.
By default, :attr:`.ConsistencyLevel.ONE` will be used for all queries. To
specify a different consistency level, you will need to wrap your queries
By default, :attr:`.ConsistencyLevel.LOCAL_QUORUM` will be used for all queries.
This is to provide unsurprising default behavior with respect to read-after-write
consistency. However, many applications will prefer :attr:`.ConsistencyLevel.ONE`
to maximize performance and availability.
You can specify a different default for the session on :attr:`.Session.default_consistency_level`.
To specify a different consistency level per request, you will need to wrap your queries
in a :class:`~.SimpleStatement`:
.. code-block:: python