lua redis.call(...)与redis中的同一调用不同

时间:2012-09-28 15:42:10

标签: lua redis

考虑代码:

redis> RPUSH test 1
(integer) 1
redis> RPUSH test 2
(integer) 2
redis> RPUSH test 19
(integer) 3
redis> RPUSH test 20
(integer) 4
redis> RPUSH test 3
(integer) 5
redis> SORT test BY nosort
1) "1"
2) "2"
3) "19"
4) "20"
5) "3"
redis 127.0.0.1:6379> eval "return redis.call('SORT', 'test', 'BY', 'nosort')" 0
1) "1"
2) "19"
3) "2"
4) "20"
5) "3"
redis 127.0.0.1:6379>

相同的操作,但是lua返回列表,其中包含损坏的排序顺序。这是一个错误吗?

我使用redis-2.6.0-rc7

1 个答案:

答案 0 :(得分:3)

是的,这是一个错误,it is fixed in Git trunk