mperham/dalli — Issue #153: Race condition when using dalli_store for Rails session
Author: nickurban
Created: 2012-01-04 21:59:37+00:00
State: open

I'm using dalli_store for my Rails session, and I'm pretty sure I'm hitting a race condition (ajax requests hitting a load balancer with multiple rails instances sharing the same memcached).

This article has a clear explanation of the general problem:
http://www.paulbutcher.com/2007/05/race-conditions-in-rails-sessions-and-how-to-fix-them/

However, the included fix is only when using SQL store.

Is there any way to simulate a lock around certain keys?

How else might we deal with this problem?