We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34f55fa commit 61a5266Copy full SHA for 61a5266
state.c
@@ -213,6 +213,20 @@ MtmCheckState(void)
213
break;
214
215
case MTM_ONLINE:
216
+ {
217
+ int nEnabled = countZeroBits(Mtm->disabledNodeMask, Mtm->nAllNodes);
218
+ // Assert( (nEnabled >= Mtm->nAllNodes/2+1) ||
219
+ // (nEnabled == Mtm->nAllNodes/2 && Mtm->refereeGrant));
220
+ if ( !((nEnabled >= Mtm->nAllNodes/2+1) ||
221
+ (nEnabled == Mtm->nAllNodes/2 && Mtm->refereeGrant)) )
222
223
+ MTM_LOG1("[STATE] disable myself, nEnabled less then majority");
224
+ MtmSetClusterStatus(MTM_DISABLED, statusReason);
225
+ MtmDisableNode(MtmNodeId);
226
+ /* do not recur */
227
+ return;
228
+ }
229
230
231
}
232
0 commit comments