执行 smembers follow43007 > :
...
30) 59849
31) (nil)
32) 476
33) 253
...
想删除第31 个这个 nil
尝试:
r-bp12ebfe10b16a04.redis.rds.aliyuncs.com:6379>srem follow43007 nil
(integer) 0
r-bp12ebfe10b16a04.redis.rds.aliyuncs.com:6379>srem follow43007 (nil)
(integer) 0
r-bp12ebfe10b16a04.redis.rds.aliyuncs.com:6379>srem follow43007 null
(integer) 0
r-bp12ebfe10b16a04.redis.rds.aliyuncs.com:6379>srem follow43007 "nil"
(integer) 0
这个nil 怎么删除呢 ?? ### 题目描述
你这个问题我还是第一次遇到,你是如何设置成 nil 的?
可以尝试一下:
srem follow43007 ""
如果还不行,就全部读出来,重写这个key吧。