Closed bjosv closed 1 year ago
This is needed if a failover has happened and we try to send a command to the node which is gone. We need to use a different node to fetch the updated slot mapping.
Some more ideas:
We should clear cc->need_update_route
when the user manually updates the slot map.
If the next command maps to the node which was failing, we can update the slot map before even trying the command. Otherwise, we can do it in parallel to executing the next command.
When
redis_cluster_command_execute()
fails to send a command, or get a reply due to context errors like timeouts, we should update the slotmap in some way. It might be problematic to perform this update in the same blocking call, specially if the slotmap update also timeout. The user of the API maybe dont want this additional waiting time in a call.One option could be to set
cc->need_update_route
and then at next send attempt we update the slotmap in parallel (unless the user already has manually updated the slotmap?).