mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 01:20:50 +00:00
Don't update node pong time via gossip.
This feature was implemented in the initial days of the Redis Cluster implementaiton but is not a good idea at all. 1) It depends on clocks to be synchronized, that is already very bad. 2) Moreover it adds a bug where the pong time is updated via gossip so no new PING is ever sent by the current node, with the effect of no PONG received, no update of tables, no clearing of PFAIL flag. In general to trust other nodes about the reachability of other nodes is a broken distributed programming model.
This commit is contained in:
parent
6ae37b0e1d
commit
303dde3757
@ -704,15 +704,8 @@ void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) {
|
||||
/* Update our state accordingly to the gossip sections */
|
||||
node = clusterLookupNode(g->nodename);
|
||||
if (node != NULL) {
|
||||
/* We already know this node. Let's start updating the last
|
||||
* time PONG figure if it is newer than our figure.
|
||||
* Note that it's not a problem if we have a PING already
|
||||
* in progress against this node. */
|
||||
if (node->pong_received < (signed) ntohl(g->pong_received)) {
|
||||
redisLog(REDIS_DEBUG,"Node pong_received updated by gossip");
|
||||
node->pong_received = ntohl(g->pong_received);
|
||||
}
|
||||
/* Handle failure reports, only when the sender is a master. */
|
||||
/* We already know this node.
|
||||
Handle failure reports, only when the sender is a master. */
|
||||
if (sender && sender->flags & REDIS_NODE_MASTER &&
|
||||
node != server.cluster->myself)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user