Repository navigation
Conversation
Needs better way of freeing the lock associated with a process.
|
The multi-concurrency locks shouldn't be freed blindly as they are in 44c722f; it's a stepping stone. |
|
This was a silly approach. Instead of an array of locks, each numbered lock should be it's own cache. They expire on their own, and the class can handle some magic to make the many caches appear as a coherent lock. This has the added benefit of allowing for substitution of MySQL's |
|
I think it would be good to combine check_single_lock/check_multi_lock type logic into one. Make it so the callers don't need to know or care if it's single or not.
Definitely agree. While the array is better than the current situation where it's not able to really purge out abandoned locks, having all locks share a cache key leads to pretty unfortunate race conditions. Letting locks have their own, and using For future readers, this will help solve the problem where a job is killed off (OOMs) higher up in the stack and is never able to release its lock. Since jobs will keep running and refreshing the lock timestamp, the "slot" of this OOM'd job will be forever taken until finally all slots are deadlocked and it can recognize that and wipe the all cache key out. |
|
Closing this as it's a bit stale. Tracking in #233. |
Fixes #3