By Sean Reifschneider Date 2009-11-29 15:34 Tags memcache, python, sean reifschneider
I just wanted to note that in the 1.45 release of the python-memcache module I have switched the hash algorithm to be compatible with the other libraries, thanks to code by Andre Cru and Ludvig Ericson. To switch back to the old-style hashing, call:
memcached.useOldServerHashFunction()
Read on for more information about the release.
I originally put this in place as something that was disabled by default and you had to explicitly enable. However, in looking at the original hashing code, and the code submitted by Andre, I came to the opinion that the previous hashing function was buggy rather than intentionally different for some reason. And I couldn't come up with a good way to gracefully migrate to the new hashing.
A painful decision, but hopefully the last time that impacts the python-memcache code.
The other big, notable change is patches from John McFarlane and Aryeh Katz which make the objects easier to garbage collect. Previously there was a circular object reference which caused the objects to never get GCed. I'm not sure why I hadn't noticed that before, because almost all the pages on our website go through python-memcached. But we just recently migrated to a newer OS install and all of a sudden started getting hit by that problem, a few days after I got one of the reports of the problem.
Here's the full change-log: