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
redis-integer-reply #114
redis-integer-reply #114
Conversation
@manjuraj please, review this code :) |
We need to fix this generically. Based on redis.io/topics/protocol "every element of a Multi Bulk Reply can be of any kind, including a nested Multi Bulk Reply". Currently the response parser assumes that every element of the multi bulk reply is a bulk reply and we have to change that |
@manjuraj Yes. you're right. I just think that Multi Bulk reply consists of "String" + "Integer Reply". Thank you. |
every element of the multi-bulk reply can be integer / bulk / nested multi-bulk reply |
I think we can just solve it for integer and bulk reply for now; nested multi-bulk reply might be hairy to implement |
@manjuraj I think nested multi-bulk reply is impossible in redis. and multi-bulk just reply can be integer/bulk. |
we need to fix '$-1' cases as bulk element, I believe |
@manjuraj Yes, and we need to fix '*-1' cases also. :) |
@manjuraj in previous code, you already handle "$-1" case :) |
redis-integer-reply
@manjuraj I tested following cases :) and it passed all cases. get abc
$-1
mget abc ade ged
*3
$-1
$-1
$-1
eval "return {10,10}" 1 TEMP
*2
:10
:10
blpop key 1 <--- for test, I changed can support this :) only for using one connection.
*-1 |
good job @charsyam |
support integer reply in multi-bulk reply
fixing parsing redis response to accept integer-reply