Pubsub numsub -> counts should be integers, not strings. #1561

Closed
jonathanslenders opened this Issue Feb 23, 2014 · 2 comments

Comments

Projects
None yet
2 participants

Right now, the "pubsub numsub" command returns the counts as a string. I think this is wrong. We have integer data types in our protocol.

Current output:

> telnet localhost 6379
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
pubsub numsub channel1 channel2
*4
$8
channel1
$1
0
$8
channel2
$1
0

Expected:

pubsub numsub channel1 channel2
*4
$8
channel1
:0
$8
channel2
:0

By the way, integers in multibulk are used elsewhere. E.g. in "script exists":

script exists aaa bbb ccc
*3
:0
:0
:0

mattsta added a commit to mattsta/redis that referenced this issue Aug 2, 2014

pubsub: Return integers for NUMSUB, not strings
Also adds test for numsub — due to tcl being tcl,
it doesn't capture the "numberness" of the fix,
but now we at least have one test case for numsub.

Closes #1561

mattsta added a commit to mattsta/redis that referenced this issue Aug 2, 2014

pubsub: Return integers for NUMSUB, not strings
Also adds test for numsub — due to tcl being tcl,
it doesn't capture the "numberness" of the fix,
but now we at least have one test case for numsub.

Closes #1561

mattsta added a commit to mattsta/redis that referenced this issue Aug 6, 2014

pubsub: Return integers for NUMSUB, not strings
Also adds test for numsub — due to tcl being tcl,
it doesn't capture the "numberness" of the fix,
but now we at least have one test case for numsub.

Closes #1561

@mattsta mattsta closed this in 2579155 Aug 25, 2014

mattsta added a commit that referenced this issue Aug 26, 2014

pubsub: Return integers for NUMSUB, not strings
Also adds test for numsub — due to tcl being tcl,
it doesn't capture the "numberness" of the fix,
but now we at least have one test case for numsub.

Closes #1561

@HeartSaVioR HeartSaVioR referenced this issue in xetorthio/jedis Aug 26, 2014

Open

Support non-blocking (Async) APIs #713

Contributor

HeartSaVioR commented Aug 26, 2014

@mattsta It could break client's response parser which should support multi-versions of Redis.
(especially strong type language)
So it should be documented, and notified well.

mattsta added a commit that referenced this issue Aug 27, 2014

pubsub: Return integers for NUMSUB, not strings
Also adds test for numsub — due to tcl being tcl,
it doesn't capture the "numberness" of the fix,
but now we at least have one test case for numsub.

Closes #1561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment