Content-Length: 289289 | pFad | http://github.com/postgrespro/postgres_cluster/commit/89ffc70cd59ee604d9e4d04e14043d8297043144

6A Fix several places where error was thrown under exclusive mtm lock · postgrespro/postgres_cluster@89ffc70 · GitHub
Skip to content

Commit 89ffc70

Browse files
committed
Fix several places where error was thrown under exclusive mtm lock
1 parent b9226d0 commit 89ffc70

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

multimaster.c

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,19 +2029,15 @@ static int64 MtmGetSlotLag(int nodeId)
20292029
*/
20302030
bool MtmIsRecoveredNode(int nodeId)
20312031
{
2032-
if (!BIT_CHECK(Mtm->disabledNodeMask, nodeId-1))
2033-
Assert(!MtmIsRecoverySession);
2034-
2035-
return BIT_CHECK(Mtm->disabledNodeMask, nodeId-1) && MtmIsRecoverySession;
2036-
// if (BIT_CHECK(Mtm->disabledNodeMask, nodeId-1)) {
2037-
// if (!MtmIsRecoverySession) {
2038-
// MTM_ELOG(WARNING, "Node %d is marked as disabled but is not in recovery mode", nodeId);
2039-
// }
2040-
// return true;
2041-
// } else {
2042-
// MtmIsRecoverySession = false; /* recovery is completed */
2043-
// return false;
2044-
// }
2032+
if (BIT_CHECK(Mtm->disabledNodeMask, nodeId-1)) {
2033+
if (!MtmIsRecoverySession) {
2034+
MTM_ELOG(WARNING, "Node %d is marked as disabled but is not in recovery mode", nodeId);
2035+
}
2036+
return true;
2037+
} else {
2038+
MtmIsRecoverySession = false; /* recovery is completed */
2039+
return false;
2040+
}
20452041
}
20462042

20472043
/*

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/89ffc70cd59ee604d9e4d04e14043d8297043144

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy