Skip to content

Commit 66a5cca

Browse files
committed
Mention Cluster.shutdown() in the upgrading guide
1 parent 7835e37 commit 66a5cca

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/upgrading.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,16 @@ in 2.1 are not yet supported.
1212
Using the v2 Native Protocol
1313
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414
By default, the driver will attempt to use version 2 of Cassandra's
15-
native protocol. When working with Cassandra 1.2, you will need to
15+
native protocol. You can explicitly set the protocol version to
16+
2, though:
17+
18+
.. code-block:: python
19+
20+
from cassandra.cluster import Cluster
21+
22+
cluster = Cluster(protocol_version=2)
23+
24+
When working with Cassandra 1.2, you will need to
1625
explicitly set the :attr:`~.Cluster.protocol_version` to 1:
1726

1827
.. code-block:: python
@@ -49,6 +58,13 @@ Lightweight Transactions
4958
to your CQL queries and set the :attr:`~.Statement.serial_consistency_level`
5059
on your statements.
5160

61+
Calling Cluster.shutdown()
62+
^^^^^^^^^^^^^^^^^^^^^^^^^^
63+
In order to fix some issues around garbage collection and unclean interpreter
64+
shutdowns, version 2.0 of the driver requires you to call :meth:`.Cluster.shutdown()`
65+
on your :class:`~.Cluster` objects when you are through with them.
66+
This helps to guarantee a clean shutdown.
67+
5268
Deprecations
5369
^^^^^^^^^^^^
5470
The following functions have moved from ``cassandra.decoder`` to ``cassandra.query``.

0 commit comments

Comments
 (0)