Skip to content

Commit d933855

Browse files
committed
move receiver/sender mask cleaning back to MtmSetClusterStatus() as it guarantees that cleaning will be executed only once during state transition
1 parent 5ac4fdd commit d933855

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

state.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ MtmSetClusterStatus(MtmNodeStatus status)
6060
MTM_LOG1("[STATE] Switching status from %s to %s status",
6161
MtmNodeStatusMnem[Mtm->status], MtmNodeStatusMnem[status]);
6262

63+
/*
64+
* Do some actions on specific status transitions.
65+
* This will be executed only once because of preceeding if stmt.
66+
*/
67+
if (status == MTM_DISABLED)
68+
{
69+
Mtm->recoverySlot = 0;
70+
Mtm->pglogicalReceiverMask = 0;
71+
Mtm->pglogicalSenderMask = 0;
72+
}
73+
6374
Mtm->status = status;
6475
}
6576

@@ -85,9 +96,6 @@ MtmCheckState(void)
8596
!BIT_CHECK(Mtm->clique, MtmNodeId-1) )
8697
{
8798
BIT_SET(Mtm->disabledNodeMask, MtmNodeId-1);
88-
Mtm->recoverySlot = 0;
89-
Mtm->pglogicalReceiverMask = 0;
90-
Mtm->pglogicalSenderMask = 0;
9199
MtmSetClusterStatus(MTM_DISABLED);
92100
return;
93101
}

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