8000 Fix wrong condition in DisableNode · postgrespro/postgres_cluster@383d5ab · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

< 8000 /qbsearch-input>
Appearance settings

Commit 383d5ab

Browse files
committed
Fix wrong condition in DisableNode
1 parent bd8b33d commit 383d5ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

contrib/mmts/multimaster.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,8 +1602,9 @@ bool MtmRefreshClusterStatus(bool nowait, int testNodeId)
16021602
timestamp_t now = MtmGetSystemTime();
16031603
for (i = 0, mask = disabled; mask != 0; i++, mask >>= 1) {
16041604
if (mask & 1) {
1605-
if (Mtm->nodes[i].lastStatusChangeTime + MSEC_TO_USEC(MtmNodeDisableDelay) > now)
1605+
if (Mtm->nodes[i].lastStatusChangeTime + MSEC_TO_USEC(MtmNodeDisableDelay) < now) {
16061606
MtmDisableNode(i+1);
1607+
}
16071608
}
16081609
}
16091610
}
@@ -2581,7 +2582,7 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId, sig_atomic_t volatile* shut
25812582
MtmSleep(STATUS_POLL_DELAY);
25822583
}
25832584
if (recovery) {
2584-
MTM_LOG1("%d: Restart replication frim node %d after end of recovery", MyProcPid, nodeId);
2585+
MTM_LOG1("%d: Restart replication from node %d after end of recovery", MyProcPid, nodeId);
25852586
} else {
25862587
MTM_LOG1("%d: Continue replication from node %d", MyProcPid, nodeId);
25872588
}

0 commit comments

Comments
 (0)
0