Redis deletes a key from set

execute smembers follow43007 >:
.
30) 59849
31) (nil)
32) 476
33) 253
.

want to delete the 31st this nil
try:

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

how to delete this nil? -sharp-sharp-sharp topic description

Apr.09,2021

this is the first time I have encountered this problem. How did you set it to nil?

give it a try: srem follow43007 ""

if it doesn't work, read it all and rewrite the key.

Menu