antirez / disque

Disque is a distributed message broker
BSD 3-Clause "New" or "Revised" License
8.01k stars 537 forks source link

cluster.c: resend AddJob & GotJob message if needed #86

Closed sunheehnus closed 9 years ago

sunheehnus commented 9 years ago

AddJob or GotJob message may be lost from socket. We should resend them to avoid a client being blocked forever.

This situation may happen in small scale cluster.


2 NODES CLUSTER

node1: send AddJob (using clusterReplicateJob and node2 is already added to node1->nodes_delivered) node2: get AddJob ,send GotJob and GotJob is lost.

client who addjob to node1 will be blocking until timeout.

:-)

sunheehnus commented 9 years ago

Oh, sorry, after a second thinking. We are using TCP to transfer data which will make it reliable. This patch will only cause flooding in network. >_< Closing.