【问题标题】:lua redis.call(...) differs from the same call in redislua redis.call(...) 与redis中的相同调用不同
【发布时间】:2012-09-20 12:33:57
【问题描述】:

考虑代码:

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 返回的列表排序顺序已损坏。是bug吗?

我用的是redis-2.6.0-rc7

【问题讨论】:

    标签: lua redis


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2021-04-15
      • 1970-01-01
      • 2013-09-29
      • 2017-06-26
      • 2020-04-30
      • 1970-01-01
      • 1970-01-01
      • 2017-11-17
      • 1970-01-01
      相关资源
      最近更新 更多