-
Notifications
You must be signed in to change notification settings - Fork 23.6k
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
[Bug] RedisModule_SignalKeyAsReady not working as expected #7878
Comments
RedisModule_SignalKeyAsReady
not working as expected
RedisModule_SignalKeyAsReady
not working as expectedRedisModule_SignalKeyAsReady
not working as expected
RedisModule_SignalKeyAsReady
not working as expected
I did some test with redis-cli and I noticed that if the key that you listen to exists before calling the command, then it the reply callback is called, so it seems that the bug happens when the key does not exist at the time of blocking. |
hello @manast |
may i know the reason you want to signal a non-existing key as ready? if it's a compelling enough we may consider to relax the definition of a "ready" key (i.e. now we assume a "ready" key must exist) |
@guybe7 This was me trying to find all corner cases for SignalKeyAsReady, however the case that actually was a problem for me was this one (I have finally found a workaround using UnblockClient instead that works for my specific use case): #7880 |
@manast NP i will push a commit with updated docs/comments |
closing |
Describe the bug
RedisModule_SignalKeyAsReady
does not work as expected.To reproduce
Here a minimal module that reproduces the issue:
Just load the module and run the command "bug1 123". It will be blocked until timing out after 10 seconds despite having called
RedisModule_SignalKeyAsReady
directly after blocking.Note, I also tested to calling
RedisModule_SignalKeyAsReady
from a timer callback with the exact same result.Expected behavior
The
BlockedReplyCallback
should be called after signaling that the key is ready.Additional information
This is on a Mac running redis 6.0.8 and the latest redismodule.h (from yesterday).
The text was updated successfully, but these errors were encountered: