Ticm

Results 4 comments of Ticm

> ZRangeByScore 需要加个 limit, ZRemRangeByScore 改成 ZRem 就可以了。 请问一下,测试了多少 msg 会出现这个报错呢? ZRemRangeByScore这个是没问题的。我测试的msg上万了。我查了资料这个应该是lua中unpack默认接收参数数量是8000,超过了就会报错。所以当有超过这个数的时候分批unpack就没问题了。你可以进一步验证一下。

同样,unack2Retry方法里也有如下错误 consume error: unack to retry script failed: ERR Error running script (call to f_6fbfacbaa1c854d463ee989905d1cd1b4f04cb14): @user_script:4: user_script:4: too many results to unpack

> 试试 [02aed25](https://github.com/HDT3213/delayqueue/commit/02aed2588259a2aa72941f809345efdff39267c8)。 没什么问题我 release 一下 我试过了,这个问题解决了。不过引发了一个新的报错。报错内容如下: consume error: unack to retry script failed: ERR Error running script (call to f_5ab54748521e20054673e7eb91d6980a89cb1b5b): @user_script:6: user_script:6: attempt to compare number with nil

> 还有个我不理解的地方是 5ab54748521e20054673e7eb91d6980a89cb1b5b 这个版本的 unack2RetryScript 里第 6 行是 `redis.call("HIncrBy", KEYS[2], k, -1) -- reduce retry count` 它不应该产生 attempt to compare number with nil 错误的 应该是把定义脚本代码的第一行空行也算上了。从空行开始算第6行应该是`if tonumber(v) > 0 then`这个代码。另外retryCountKey 中找不到某条消息的重试次数触发原因这块我再测试测试。