Hello!
2012/10/11 陶春华:
> 最近发现线上系统有个bug,当redis中,某个key所对应的value是空字符串的时候,redis.lua中的_read_reply()函数就会在sock:receive(size)时崩
> 溃。而使用标准的redis-cli就不会崩溃,我猜测应该是通信协议实现的不完整。
>
这个是 ngx_lua 中已经早已修复了的老 bug. 最早是在 5 月 29 日发布的 ngx_openresty 1.0.15.7
(ngx_lua 0.5.0rc29)中修复的,细节可以参见当时的 change log:
http://openresty.org/#ChangeLog1000015
所以你使用的版本应当老于近 5 个月前发布的这个 1.0.15.7.
而最新的 ngx_openresty 稳定版是几天前刚发布的 1.2.3.8 (ngx_lua 0.6.10, lua-resty-redis 0.14).
建议总是使用 ngx_openresty 最新的稳定版或者开发版发布:
http://openresty.org/#Download
推荐订阅 openresty 中文邮件列表:
https://groups.google.com/group/openresty
新的 openresty 版本都会在那里第一时间公布。
Best regards,
-agentzh
P.S. 已抄送 openresty 中文邮件列表。