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

Commit 3050588

Browse files
committed
add originLockNodeMask logging
1 parent c3b857a commit 3050588

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

multimaster.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,6 +2125,8 @@ void MtmCheckRecoveryCaughtUp(int nodeId, lsn_t slotLSN)
21252125
*/
21262126
MTM_LOG1("Node %d is almost caught-up: slot position %llx, WAL position %llx, active transactions %d",
21272127
nodeId, slotLSN, walLSN, Mtm->nActiveTransactions);
2128+
2129+
MTM_LOG1("[LOCK] set lock on MtmCheckRecoveryCaughtUp");
21282130
BIT_SET(Mtm->originLockNodeMask, nodeId-1); // XXXX: log that
21292131
} else {
21302132
MTM_LOG2("Continue recovery of node %d, slot position %llx, WAL position %llx,"

state.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ MtmCheckState(void)
127127
case MTM_RECOVERY:
128128
if (!BIT_CHECK(Mtm->disabledNodeMask, MtmNodeId-1))
129129
{
130+
MTM_LOG1("[LOCK] set lock on MTM_RECOVERY switch");
130131
BIT_SET(Mtm->originLockNodeMask, MtmNodeId-1); // kk trick, XXXX: log that
131132
MtmSetClusterStatus(MTM_RECOVERED);
132133
return;
@@ -148,6 +149,7 @@ MtmCheckState(void)
148149
* in major mode or with referee we can be working alone
149150
* so nobody will clean it.
150151
*/
152+
MTM_LOG1("[LOCK] release lock on MTM_RECOVERED switch");
151153
BIT_CLEAR(Mtm->originLockNodeMask, MtmNodeId-1);
152154
MtmSetClusterStatus(MTM_ONLINE);
153155
return;
@@ -177,6 +179,7 @@ MtmStateProcessNeighborEvent(int node_id, MtmNeighborEvent ev) // XXXX camelcase
177179

178180
case MTM_NEIGHBOR_WAL_RECEIVER_START:
179181
BIT_SET(Mtm->pglogicalReceiverMask, node_id - 1);
182+
MTM_LOG1("[LOCK] release lock on MTM_NEIGHBOR_WAL_RECEIVER_START event");
180183
BIT_CLEAR(Mtm->originLockNodeMask, MtmNodeId-1);
181184
break;
182185

@@ -190,6 +193,7 @@ MtmStateProcessNeighborEvent(int node_id, MtmNeighborEvent ev) // XXXX camelcase
190193
break;
191194

192195
case MTM_NEIGHBOR_RECOVERY_CAUGHTUP:
196+
MTM_LOG1("[LOCK] release lock on MTM_NEIGHBOR_RECOVERY_CAUGHTUP event");
193197
BIT_CLEAR(Mtm->originLockNodeMask, node_id - 1);
194198
MtmEnableNode(node_id);
195199
break;

0 commit comments

Comments
 (0)