vseloved / cl-redis

Redis client for Common Lisp
Other
188 stars 38 forks source link

lrange function is failing for big keys #2

Closed kushaldas closed 13 years ago

kushaldas commented 13 years ago

red-lrange function is failing on keys like parse_printf_directive<char, std::char_traits, std::allocator, __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits, std::allocator > >, std::ctype >

But redis-cli works with keys like the above

kushaldas commented 13 years ago

Basically if the key contains a space the following error is thrown:

Redis error: ERR wrong number of arguments for 'lrange' command

debug output:

(redis:with-connection () (redis:red-lrange "sdd sd " 0 -1))

LRANGE sdd sd 0 -1

kushaldas commented 13 years ago

Redis upstream asked to remove all inline protocol and use only multi protocol. ( kushal: the argument for doing this is that all communication will be binary safe )

For now I just replaced all incline to multi and trying the code, still now working.

vseloved commented 13 years ago

Basically, you have to use command-type :generic. I'm currently switching to new protocol: it simplifies things a bit, but there seem to be some issues with non-ascii characters handling. I'm investigating, whether they're in Redis itself or in the client (which is highly unlikely).

vseloved commented 13 years ago

Switched to new protocol in v.2.0.0 (commit 2ba5ea24f2a08f3a8461)