File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1474,13 +1474,17 @@ class Session(object):
14741474 .. versionadded:: 2.0.0
14751475 """
14761476
1477- default_consistency_level = ConsistencyLevel .ONE
1477+ default_consistency_level = ConsistencyLevel .LOCAL_QUORUM
14781478 """
14791479 The default :class:`~ConsistencyLevel` for operations executed through
14801480 this session. This default may be overridden by setting the
14811481 :attr:`~.Statement.consistency_level` on individual statements.
14821482
14831483 .. versionadded:: 1.2.0
1484+
1485+ .. versionchanged:: 3.0.0
1486+
1487+ default changed from ONE to LOCAL_QUORUM
14841488 """
14851489
14861490 max_trace_wait = 2.0
Original file line number Diff line number Diff line change 9898
9999 .. autoattribute :: default_timeout
100100
101+ .. autoattribute :: default_consistency_level
102+ :annotation: = LOCAL_QUORUM
103+
101104 .. autoattribute :: row_factory
102105
103106 .. autoattribute :: default_fetch_size
Original file line number Diff line number Diff line change @@ -327,8 +327,12 @@ The consistency level used for a query determines how many of the
327327replicas of the data you are interacting with need to respond for
328328the query to be considered a success.
329329
330- By default, :attr:`.ConsistencyLevel.ONE ` will be used for all queries. To
331- specify a different consistency level, you will need to wrap your queries
330+ By default, :attr:`.ConsistencyLevel.LOCAL_QUORUM ` will be used for all queries.
331+ This is to provide unsurprising default behavior with respect to read- after- write
332+ consistency. However, many applications will prefer :attr:`.ConsistencyLevel.ONE `
333+ to maximize performance and availability.
334+ You can specify a different default for the session on :attr:`.Session.default_consistency_level` .
335+ To specify a different consistency level per request, you will need to wrap your queries
332336in a :class :`~ .SimpleStatement` :
333337
334338.. code- block:: python
You can’t perform that action at this time.
0 commit comments