Yeah, thought about that, couldn't figure out a good way.

One option is to use Redis' support of transactions. We can make a transaction for each to-be-backfilled record that will do two things: (1) read the data again from the new server; (2) write the value only when the data does not exist in the new server. (1) and (2) will be done without any other writes in the middle.

Another option is to not backfill at all. So for all the keys in the old server, we will always query twice.

WDYT?