You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the client pause write is set and all the keys in the server are expired keys, executing the randomkey command will lead to an infinite loop.
To reproduce
First, write a key with an expiration time. For example:
set key value ex 30
Second, execute the client pause command. For example:
client pause 60000 write
Third, wait for the key to expire, and then execute the randomkey command while the client pause is still in effect.
randomkey
Expected behavior
It is expected that the redis-server will return an expired key. However, in reality, there is no response at all, and the CPU utilization of the process reaches 100%.
Additional information
This bug will directly render redis-server unavailable.