记录一下codis遇到的这个情况,在客户端连接销毁时如果执行quit命令,有较高概率返回的数据不完整,导致客户端解析出错。具体的说是缺少了”+OK”这几个字符,在redis里执行quit命令返回的结果里会有”+OK”:
$ telnet redis-server 6379
Trying xxx.xxx.xxx.xxx...
Connected to xxx.xxx.xxx.xxx.
Escape character is '^]'.
quit
+OK
Connection closed by foreign host.
而在codis上有时返回的数据缺乏“+OK”
$ telnet codis-server 19000
Trying yyy.yyy.yyy.yyy...
Connected to yyy.yyy.yyy.yyy.
Escape character is '^]'.
quit
Connection closed by foreign host.
还没有去查codis服务器端,先做个记录。