Comment 1 for bug 974632

Revision history for this message
Brad Crittenden (bac) wrote :

We recently upgraded python-memcached from 1.45 to 1.48 (it looks like 1.49 was available at the time but not used).

The fix for bug 728359 directly affected the readline method and introduced the _ConnectionDeadError, which is now raised in readline() when the server socket is seen to be closed.

Previously, under those conditions readline() simply returned None. Now it raises an exception. In two places (_get() and _set()) that exception is caught and a retry is performed. Unfortunately, many other places in memcache.py call readline() but do not handle the exception.

The path that we're experiencing is the expect() method. In 1.45 if the socket were closed, readline() would return None, the expected values wouldn't match, and a message was written to the debug log but there were no other ill effects.

Now we get this exception propagated.

It appears to me the fix for bug 728359 was not implemented thoroughly and has left python-memcached in state where exceptions can escape that were not intended, as indicated by the name _ConnectionDeadError.