pycassa/pycassa — pull request #164 by hannosch (2012-07-18 08:42:50+00:00)
Title: C11 exception base class changes vs. pool retry

I noticed one unintended side-effect of the thrift API updates. The custom exceptions in ttypes.py now inherit from TException instead of the Python's Exception base class. I think that's a sensible change.

But the retry logic in the connection pool, amongst others retried all exceptions inheriting from TException. This would also retry things like InvalidRequestException or AuthenticationException. I changed the logic to retry TTransportException instead, which restores the old behavior (letting those raise directly and not being covered up in a MaximumRetryException).

Compared to pycassa 1.6.0 TProtocolException is no longer retried. Looking at the places where thrift raises those, they look like general configuration/installation problems and not intermittent problems likely to be fixed by a retry.