Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit be9bd5b

Browse files
committed
Always try to send heartbeats.
Old behaviour here can cause subtle bugs, for example it can happened that none of mentioned conditiotions is true when disabled node connects to a major node which is online. So just send it allways.
1 parent cca50ae commit be9bd5b

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

arbiter.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,17 @@ static void MtmSendHeartbeat()
359359
for (i = 0; i < Mtm->nAllNodes; i++)
360360
{
361361
if (i+1 != MtmNodeId) {
362-
if (!BIT_CHECK(busy_mask, i)
363-
&& (Mtm->status != MTM_ONLINE
364-
|| sockets[i] >= 0
365-
|| !BIT_CHECK(Mtm->disabledNodeMask, i)
366-
|| BIT_CHECK(Mtm->reconnectMask, i)))
362+
if (!BIT_CHECK(busy_mask, i))
363+
/*
364+
* Old behaviour here can cause subtle bugs, for example
365+
* it can happened that none of mentioned conditiotions is
366+
* true when disabled node connects to a major node which
367+
* is online. So just send it allways. --sk
368+
*/
369+
// && (Mtm->status != MTM_ONLINE
370+
// || sockets[i] >= 0
371+
// || !BIT_CHECK(Mtm->disabledNodeMask, i)
372+
// || BIT_CHECK(Mtm->reconnectMask, i)))
367373
{
368374
if (!MtmSendToNode(i, &msg, sizeof(msg))) {
369375
MTM_ELOG(LOG, "Arbiter failed to send heartbeat to node %d", i+1);

0 commit comments

Comments
 (0)