DO NOT sync data from redis to codis-proxy
Closed this issue · 1 comments
Because codis-proxy dose not guarantee to execute redis commands orderly
Hi @marathonrush , thank you very much for reminding. But actually, I think your conclusion doesn't make sense. Actually, codis proxy guarantees that the commands from the same client will be handled and dispatched in FIFO order. That is to say, the commands' execution order can be guaranteed if they're sent from the same client and have same hash slot.
If you have read the source code of redis-port, the dirty code, I think you should know that the porting work can be divided into two stages. In the 1st stage, namely the RDB restoring stage, the database will be rebuilt in key-level, which means the execution order doesn't matter and redis-port will setup multiple connections to maximize the speed of restoring process. Then in the 2nd stage, namely the backlog restoring stage, the forwarded command-level backlog will be sent to codis-proxy, and the execution order does matter. In this stage, redis-port will only use single connection to forward the backlog commands. As I said at the very beginning of this reply, the codis-proxy can guarantee the FIFO order in this stage. That's my explanation. Please let me know if you have more questions. Thanks.