Skip to content

Commit 39f80e1

Browse files
committed
ignore clique detector in major mode
1 parent e1d11c5 commit 39f80e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

state.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,15 @@ MtmCheckState(void)
102102
// XXXX: should we restrict major with two nodes setup?
103103
|| (nConnected == Mtm->nAllNodes/2 && MtmMajorNode) /* or half + major node */
104104
|| (nConnected == Mtm->nAllNodes/2 && Mtm->refereeGrant) ) /* or half + referee */
105-
&& BIT_CHECK(Mtm->clique, MtmNodeId-1) /* in clique */
105+
&& (BIT_CHECK(Mtm->clique, MtmNodeId-1) || Mtm->refereeGrant) /* in clique when non-major */
106106
&& !BIT_CHECK(Mtm->stoppedNodeMask, MtmNodeId-1); /* is not stopped */
107107

108108
/* ANY -> MTM_DISABLED */
109109
if (!isEnabledState)
110110
{
111-
BIT_SET(Mtm->disabledNodeMask, MtmNodeId-1);
111+
// BIT_SET(Mtm->disabledNodeMask, MtmNodeId-1);
112112
MtmSetClusterStatus(MTM_DISABLED);
113+
MtmDisableNode(MtmNodeId);
113114
return;
114115
}
115116

@@ -311,9 +312,9 @@ void MtmOnNodeDisconnect(int nodeId)
311312
* We should disable it, as clique detector will not necessarily
312313
* do that. For example it will anyway find clique with one node.
313314
*/
314-
MtmDisableNode(nodeId);
315315

316316
MtmLock(LW_EXCLUSIVE);
317+
MtmDisableNode(nodeId);
317318
BIT_SET(SELF_CONNECTIVITY_MASK, nodeId-1);
318319
BIT_SET(Mtm->reconnectMask, nodeId-1);
319320
Mtm->nConfigChanges += 1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy