-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should use redis.Watch to ensure proper concurrency #1
Comments
Fixed in v1.1.0 |
May I ask how do you treat the case when a Redis transaction fails because keys have changed and the previous watch command prevented the execution of the Redis commands? http://redis.io/topics/transactions In order to prevent all this concurrency problems it might be a good idea to use Redis 2.6 with Lua scripting support. Redis guarantees that the Lua script will be ran safely and in that case multiple operations on keys can be done without side effects. |
So, right now, it'll just fail (which isn't ideal). I'm planning on using the generational approach in my NHibernate.Caches.Redis library but I haven't had time in the past few weeks. This approach keeps the generation of the data for every Redis client in sync. I'd be happy to also accept a pull request with this too 😄 ! I do apologize for not having the time to update this, since my project's aren't currently using this code. |
I thought I'd let you know that I just released v1.2.0 that will attempt to replay the transaction if it failed. |
No description provided.
The text was updated successfully, but these errors were encountered: