-
Notifications
You must be signed in to change notification settings - Fork 127
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
Prevent most Redis commands when subscribed to PubSub channel #219
Comments
Hello, thanks! I think we can do it, for example by introducing It will change the API, but we next version will be a major one anyways, so it should not be a problem. At this point I don't see any potential drawback in this solution. Just a question, would you like to lead this work? I'm not sure how much time will I able to spend on this, also I don't have a good use-case scenario where I can test the approach and I'm afraid that small tests and artificial cases may not work well to validate the sanity of the implementation. I not I'll try to spend some time on a weekend. |
Yes, I'm happy to lead the work on this. One should be able to run redis request/reply commands over a pipelined connection, but not pub/sub. Adding the different types of connections is a bit unfortunate, but I think all the variations have a genuine use case. |
While I find the work magnificent, I'm not very easy on the massive change to the types in the library, so I want to spend some amount of time on understanding if this is necessary or if we can find some middle ground. Unfortunately I'll do it only on weekend at best, so please sorry me for not spending as much attention to your work as it deserves. |
I spent a long time tracking down a heisenbug recently, that I'm fairly confident comes down to the fact that you're not allowed to use most redis commands if you're subscribed to a pub/sub channel.
The docs say:
Even if it didn't cause my specific bug, I think that it would be great for
hedis
to prevent this misuse of redis, preferably in the type system.This limitation no longer applies to RESP3.
The text was updated successfully, but these errors were encountered: