The main goal is to achieve Redis rollback from 6.2 to 3.2 using AOF. (As AOF is supported in both versions) I am able to roll back a single running server. But I am stuck at

  • How to make a rolled back server as master as soon as it is up and that specifically means before it tries to sync with the current master. (Obvious reason for this requirement is the RDB version mismatch in Redis versions that leads to data loss).
  • Is there a way I can set a delay on replication upon rolled back slave and do a sentinel failover before the replication to make this server as master.

I know there is a chance of data loss with this approach for the time between the rollback start and rolled back server becoming master. But I am willing to take that risk. Any thoughts? Thanks!

Comment From: hwware

@benimohit I have a little bit confused on the following words:

How to make a rolled back server master as soon as it is up and that specifically means before it tries to sync with the master. If you mean make a rolled back server replication here because you mentioned the master twice?

For the second question: Is there a way I can set a delay on replication upon rolled back slave and do a sentinel failover before the replication to make this server as master.

I think maybe you could set down-after-milliseconds longer time or quorum number in sentinel config file to delay the failover

Comment From: benimohit

@hwware I have updated the warding for the 1st question, I hope it makes sense now. Thanks for the suggestion for the second question. I think I have made some progress on stoping the rolled back server from replicating upon start by running a Sentinel Reset command before starting it. Now, this server is a standalone server and I need to figure out how do I add it back in the cluster as master. I figured I can use slaveof command to make the rolled back server master but the problem is sentinels are recognising it seemlesely