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

Commit d1eaf4c

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 3e0d7aa commit d1eaf4c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

contrib/mmts/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)