-
Notifications
You must be signed in to change notification settings - Fork 103
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
PUSH type not distinguishable from ARRAY type in RESP3 #128
Comments
@dvora-h interesting, for when we work on RESP3 |
@dvora-h What do your redis-py tests show here? Does the PubSub push test in the 5.0 work in this scenario? |
@stereobutter Can you help me understand why you believe that list is more appropriate here? Given what I read in the specification, I'd have yielded a string, to handle:
I read that as ideally it should be an array, but YMMV since you have to hit up a callback anyway. Again a List seems right. |
@chayim I am not sure I understand your question, so please excuse if my response doesn't make sense. As I understand it the In RESP3 the array and push types only differ by the first character ( The spec says
|
RESP3 introduced the
PUSH
type for transmitting out of band data to a client (such as pubsub messages, client tracking invalidation events etc.). Except for being its own type (identified by the>
symbol)PUSH
is the same asARRAY
.Currently using hiredis-py parsing a
PUSH
message returns a list, same as parsing anARRAY
.This makes it impossible for a client to differentiate
PUSH
andARRAY
messages. AsPUSH
messages may be interleaved with regular replies (such as when usingCLIENT TRACKING
on the same connection) it is important for a client to be able and differentiate them.It appears upstream
hiredis
already supports thePUSH
typeFor hiredis-py
PUSH
messages clould use a subclass oflist
i.e. something liketype('push', (list,), {})
.The text was updated successfully, but these errors were encountered: