Skip to content
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

rl_系列命令有问题 #12

Open
LazyZhu opened this issue Jan 9, 2013 · 6 comments
Open

rl_系列命令有问题 #12

LazyZhu opened this issue Jan 9, 2013 · 6 comments

Comments

@LazyZhu
Copy link
Contributor

LazyZhu commented Jan 9, 2013

按如下命令循环测试几次就会发现问题:

rl_set mykey "Hello"
rl_get mykey
get mykey
ds_get mykey
rl_del mykey
get mykey
ds_get mykey

另外ds_del返回的不应该是OK,而应该是被成功删除key数目

@shenzhe
Copy link
Collaborator

shenzhe commented Jan 9, 2013

呵呵,真早呀,谢谢反馈,我这边跟进一下。

@LazyZhu
Copy link
Contributor Author

LazyZhu commented Jan 9, 2013

我用ngx_lua的redis库做了测试对比:

redis
http://198.74.110.195/t1
https://gist.github.com/aaecf819d4d8f539ab4b

redis-storage
http://198.74.110.195/t2
https://gist.github.com/ed560f14576810718c3d

不仅可以直观比较两者区别,还发现运行 rl 命令后,比较前后 ds_hxxx 命令的响应值,redis出现了错误。

@qiye
Copy link
Owner

qiye commented Jan 9, 2013

这个bug,我让泽泽 修改一下

@shuxiang
Copy link

redis 127.0.0.1:6379> rl_set foo 7
OK
redis 127.0.0.1:6379> rl_get foo
"7"
redis 127.0.0.1:6379> rl_del foo
(integer) 1
redis 127.0.0.1:6379> ds_get foo
(integer) 1
redis 127.0.0.1:6379> ds_get foo
(nil)
redis 127.0.0.1:6379> get foo
(nil)
redis 127.0.0.1:6379> set foo 7
(nil)
redis 127.0.0.1:6379> set foo 7
OK
redis 127.0.0.1:6379> set foo 7
OK
redis 127.0.0.1:6379> get foo
OK
redis 127.0.0.1:6379> get foo
"7"

完全不懂怎么回事呀

@shuxiang
Copy link

没用rl系列命令是正常的,用了rl系列命令后,各种诡异!!!

@shuxiang
Copy link

弄了个python的客户端,https://github.com/shuxiang/redis-py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants