mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
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.
This commit is contained in:
parent
a2ff90919f
commit
e26f4486b0
@ -1546,6 +1546,10 @@ int clusterProcessPacket(clusterLink *link) {
|
|||||||
/* If in our current config the node is a slave, set it as a master. */
|
/* If in our current config the node is a slave, set it as a master. */
|
||||||
if (nodeIsSlave(n)) clusterSetNodeAsMaster(n);
|
if (nodeIsSlave(n)) clusterSetNodeAsMaster(n);
|
||||||
|
|
||||||
|
/* Update the node's configEpoch. */
|
||||||
|
n->configEpoch = reportedConfigEpoch;
|
||||||
|
clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG|CLUSTER_TODO_FSYNC_CONFIG);
|
||||||
|
|
||||||
/* Check the bitmap of served slots and udpate our
|
/* Check the bitmap of served slots and udpate our
|
||||||
* config accordingly. */
|
* config accordingly. */
|
||||||
clusterUpdateSlotsConfigWith(n,reportedConfigEpoch,
|
clusterUpdateSlotsConfigWith(n,reportedConfigEpoch,
|
||||||
|
Loading…
Reference in New Issue
Block a user