bbangert/retools — Issue #8: Stale Lock Blocks Cache Generation
Author: jerryji
Created: 2012-01-31 01:18:23+00:00
State: open

Hi Ben,

In production, I've experienced stale lock issue, i.e., somehow an old lock is not deleted and prevents all further cache from being generated.

I think this is caused by line 144-145 in cache.py --

144 if result and redis.exists(keys.lock_key):
145 return cPickle.loads(result['value'])
146
147 with Lock(keys.lock_key, expires=expires, timeout=60*60*24*7):

And I even think the two lines are not needed as stale lock condition is already taken care of in the "with Lock():" section that follows (from how I understand lock.py).

What do you think? Please correct me if I'm wrong.

Thanks.

Jerry
(a llong-time Pylons user :)