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

Commit 752277c

Browse files
committed
Make heartbeat check more conservative
1 parent e0306d6 commit 752277c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/mmts/arbiter.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ void MtmReceiver(Datum arg)
911911
MtmDisconnect(i);
912912
}
913913
}
914+
now = MtmGetSystemTime();
914915
for (j = 0; j < n; j++) {
915916
if (events[j].events & EPOLLIN)
916917
#else
@@ -935,6 +936,7 @@ void MtmReceiver(Datum arg)
935936
if (n < 0) {
936937
MTM_ELOG(ERROR, "Arbiter failed to select sockets: %s", strerror(errno));
937938
}
939+
now = MtmGetSystemTime();
938940
for (i = 0; i < nNodes; i++) {
939941
if (sockets[i] >= 0 && FD_ISSET(sockets[i], &events))
940942
#endif
@@ -1188,7 +1190,6 @@ void MtmReceiver(Datum arg)
11881190
}
11891191
}
11901192
if (Mtm->status == MTM_ONLINE) {
1191-
now = MtmGetSystemTime();
11921193
/* Check for heartbeats only in case of timeout expiration: it means that we do not have non-processed events.
11931194
* It helps to avoid false node failure detection because of blocking receiver.
11941195
*/

0 commit comments

Comments
 (0)