I create a cluster(master nodes: 30001-30008; slave nodes: 30009-30016) , and I use command to set a lot of key-values. when I execute the FLUSHDB command in the master node 30001, it finished after about 23s, and the master node 30001 became the slave node, the corresponding slave node 30009 become the master node. I want to know if this the write result? or this is the initial goal you want to get?

Comment From: badboy

Redis is single-threaded. Every command will block other clients. If your FLUSHDB takes a long time, Sentinel/Cluster might see that node as down, as it doesn't respond to pings anymore. Right now your best shot is to use SCAN and DEL iteratively to allow PING commands in between. Soon you will be able to use FLUSHDB LAZY to lazily flush the database without blocking it for a long time.

Comment From: madolson

It does, you can use flushDB async if this is causing any problems for you.