mirror of
https://github.com/fluencelabs/redis
synced 2025-06-25 23:11:33 +00:00
Cluster: link reconnection on delayed PONG reply.
When the PONG delay is half the cluster node timeout, the link gets disconnected (and later automatically reconnected) in order to ensure that it's not just a dead connection issue. However this operation is only performed if the link is old enough, in order to avoid to disconnect the same link again and again (and among the other problems, never receive the PONG because of that). Note: when the link is reconnected, the 'ping_sent' field is not updated even if a new ping is sent using the new connection, so we can still reliably detect a node ping timeout.
This commit is contained in:
@ -538,6 +538,7 @@ struct clusterNode;
|
||||
|
||||
/* clusterLink encapsulates everything needed to talk with a remote node. */
|
||||
typedef struct clusterLink {
|
||||
time_t ctime; /* Link creation time */
|
||||
int fd; /* TCP socket file descriptor */
|
||||
sds sndbuf; /* Packet send buffer */
|
||||
sds rcvbuf; /* Packet reception buffer */
|
||||
|
Reference in New Issue
Block a user