From 66a5cca5abe8214e1bfd827e2f2714479ea1e41a Mon Sep 17 00:00:00 2001 From: Tyler Hobbs Date: Wed, 28 May 2014 14:53:52 -0500 Subject: [PATCH] Mention Cluster.shutdown() in the upgrading guide --- docs/upgrading.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/upgrading.rst b/docs/upgrading.rst index d2fb1de1..78af6014 100644 --- a/docs/upgrading.rst +++ b/docs/upgrading.rst @@ -12,7 +12,16 @@ in 2.1 are not yet supported. Using the v2 Native Protocol ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ By default, the driver will attempt to use version 2 of Cassandra's -native protocol. When working with Cassandra 1.2, you will need to +native protocol. You can explicitly set the protocol version to +2, though: + +.. code-block:: python + + from cassandra.cluster import Cluster + + cluster = Cluster(protocol_version=2) + +When working with Cassandra 1.2, you will need to explicitly set the :attr:`~.Cluster.protocol_version` to 1: .. code-block:: python @@ -49,6 +58,13 @@ Lightweight Transactions to your CQL queries and set the :attr:`~.Statement.serial_consistency_level` on your statements. +Calling Cluster.shutdown() +^^^^^^^^^^^^^^^^^^^^^^^^^^ +In order to fix some issues around garbage collection and unclean interpreter +shutdowns, version 2.0 of the driver requires you to call :meth:`.Cluster.shutdown()` +on your :class:`~.Cluster` objects when you are through with them. +This helps to guarantee a clean shutdown. + Deprecations ^^^^^^^^^^^^ The following functions have moved from ``cassandra.decoder`` to ``cassandra.query``.