Skip to content
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

pipeline.watch checks value rather than commands #218

Closed
bmerry opened this issue Sep 19, 2018 · 1 comment
Closed

pipeline.watch checks value rather than commands #218

bmerry opened this issue Sep 19, 2018 · 1 comment

Comments

@bmerry
Copy link
Collaborator

bmerry commented Sep 19, 2018

In real redis, a command that modifies a key invalidates a WATCH on that key, even if the value remains the same. fakeredis currently compares the value before and after, so it won't invalidate the watch. On the other hand, fakeredis will invalidate the watch if the key expires (because it no longer exists), but real redis won't (see https://code.google.com/archive/p/redis/issues/270).

Fixing this will be a major endeavour, since it will require investigating exactly what conditions trigger expiry in redis, and most likely modifying every single write command to trigger expiry.

@bmerry
Copy link
Collaborator Author

bmerry commented Jan 14, 2019

Fixed in 1.0rc1, although there may be corner cases where behaviour doesn't match redis. Sometimes commands that modify a key in a way that doesn't actually change the value will trigger watches, sometimes they won't.

@bmerry bmerry closed this as completed Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant