Skip to content
Browse files

Cluster: update node configEpoch on UPDATE messages.

The UPDATE message contains the configEpoch of the node configuration
advertised in the packet. Update it if needed.
  • Loading branch information...
1 parent a2ff909 commit e26f4486b07070d795644a16e50429917b86eee0 @antirez committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/cluster.c
4 src/cluster.c
@@ -1546,6 +1546,10 @@ int clusterProcessPacket(clusterLink *link) {
/* If in our current config the node is a slave, set it as a master. */
if (nodeIsSlave(n)) clusterSetNodeAsMaster(n);
+ /* Update the node's configEpoch. */
+ n->configEpoch = reportedConfigEpoch;
/* Check the bitmap of served slots and udpate our
* config accordingly. */

0 comments on commit e26f448

Please sign in to comment.
Something went wrong with that request. Please try again.