You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if you try to subscribe to a Pub/Sub channel with the async API and the server reply with an error such as -ERR Loading... the hiredis client will crash.
My point of view is that while there is some kind of problem in hiredis that's worth fixing, in this specific case it also shows a problem with the Redis server that should instead allow to subscribe to Pub/Sub while the server is loading data. I'm fixing the server but I think it's worth fixing hiredis as well, given that the fix for the server will probably not be back ported to Redis 2.4, and there may be in the future some other reason to reply with an error to the first subscribe.
Cheers,
Salvatore
The text was updated successfully, but these errors were encountered:
The client will now disconnect the context when it receives a spontaneous error reply. I believe this is the best strategy at this point, because it can't retry subscriptions, or do other fancy state recovery when the server starts accepting commands.
Hello Pieter, thanks for the fix! About the strategy, what I can say is that in Sentinel if subscribe fails what I do is, actually, to manually disconnect the channel, and retry from scratch, so at application level I reasoned likewise.
Hello!
if you try to subscribe to a Pub/Sub channel with the async API and the server reply with an error such as
-ERR Loading...
the hiredis client will crash.My point of view is that while there is some kind of problem in hiredis that's worth fixing, in this specific case it also shows a problem with the Redis server that should instead allow to subscribe to Pub/Sub while the server is loading data. I'm fixing the server but I think it's worth fixing hiredis as well, given that the fix for the server will probably not be back ported to Redis 2.4, and there may be in the future some other reason to reply with an error to the first subscribe.
Cheers,
Salvatore
The text was updated successfully, but these errors were encountered: