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

Commit c1785c0

Browse files
knizhnikkelvich
authored andcommitted
Do no peform harakiri (disable myslef) in recovery mode
1 parent d94c9cf commit c1785c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

multimaster.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,9 @@ void MtmRefreshClusterStatus()
22712271
timestamp_t now = MtmGetSystemTime();
22722272
for (i = 0, mask = disabled; mask != 0; i++, mask >>= 1) {
22732273
if (mask & 1) {
2274-
if (Mtm->nodes[i].lastStatusChangeTime + MSEC_TO_USEC(MtmNodeDisableDelay) < now) {
2274+
if ((i+1 != MtmNodeId || Mtm->status == MTM_ONLINE)
2275+
&& Mtm->nodes[i].lastStatusChangeTime + MSEC_TO_USEC(MtmNodeDisableDelay) < now)
2276+
{
22752277
MtmDisableNode(i+1);
22762278
}
22772279
}

0 commit comments

Comments
 (0)