bbangert / retools

Redis Tools
MIT License
138 stars 41 forks source link

Stale Lock Blocks Cache Generation #8

Closed jerryji closed 12 years ago

jerryji commented 12 years ago

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 long-time Pylons user :)

bbangert commented 12 years ago

Are you using the last release? A bug related to that line was discovered and has been fixed in the tip, can you try the tip and see if that remedies it?

jerryji commented 12 years ago

Thanks Ben, I totally forgot I was still on the 0.1 release.

Have moved to tip, the bug seems to be corrected logically and I'll monitor in production.

BTW, given the severity of this bug, is there any plan to push out the 0.2 release any time soon?

bbangert commented 12 years ago

Yep, I'm aiming to get a release out this week.