0

I used redis for synchronize some datas.

Precondition : Data inserted into redis continuously. (About 30,000 in 10 minutes)

Here is work flow that execute every 5 minutes.

  1. Scan keys by specific pattern(ex. 'users*')

  2. Get all values by keys

  3. Flush all keys

In workflow 1, I used scan_iter() to avoid locking.

I wonder that in my workflow, there is any things to causing redis lock?

If data insertion and scanning keys occur simultaneously, it can cause locking?

Hide
  • 3,199
  • 7
  • 41
  • 83

1 Answers1

0

If you are not using the ASYNC option then FLUSHDB and FLUSHALL are blocking commands.

https://redis.io/commands/flushall

dizzyf
  • 3,263
  • 19
  • 29