@@ -1638,8 +1638,8 @@ bool MtmRecoveryCaughtUp(int nodeId, XLogRecPtr slotLSN)
1638
1638
BIT_CLEAR (Mtm -> nodeLockerMask , nodeId - 1 );
1639
1639
Mtm -> nLockers -= 1 ;
1640
1640
} else {
1641
- MTM_LOG1 ("%d: node %d is caugth -up without locking cluster" , MyProcPid , nodeId );
1642
- /* We are lucky: caugth -up without locking cluster! */
1641
+ MTM_LOG1 ("%d: node %d is caught -up without locking cluster" , MyProcPid , nodeId );
1642
+ /* We are lucky: caught -up without locking cluster! */
1643
1643
}
1644
1644
MtmEnableNode (nodeId );
1645
1645
Mtm -> nConfigChanges += 1 ;
@@ -1789,9 +1789,9 @@ MtmBuildConnectivityMatrix(nodemask_t* matrix, bool nowait)
1789
1789
* Build connectivity graph, find clique in it and extend disabledNodeMask by nodes not included in clique.
1790
1790
* This function returns false if current node is excluded from cluster, true otherwise
1791
1791
*/
1792
- bool MtmRefreshClusterStatus (bool nowait , int testNodeId )
1792
+ bool MtmRefreshClusterStatus (bool nowait )
1793
1793
{
1794
- nodemask_t mask , clique , disabled , enabled ;
1794
+ nodemask_t mask , clique , disabled ;
1795
1795
nodemask_t matrix [MAX_NODES ];
1796
1796
int clique_size ;
1797
1797
int i ;
@@ -1832,13 +1832,6 @@ bool MtmRefreshClusterStatus(bool nowait, int testNodeId)
1832
1832
}
1833
1833
}
1834
1834
}
1835
- }
1836
- enabled = clique & Mtm -> disabledNodeMask ; /* new enabled nodes mask */
1837
- if (testNodeId != 0 && BIT_CHECK (enabled , testNodeId - 1 )) {
1838
- MtmEnableNode (testNodeId );
1839
- }
1840
-
1841
- if (disabled |enabled ) {
1842
1835
MtmCheckQuorum ();
1843
1836
}
1844
1837
#if 0
@@ -1918,7 +1911,7 @@ void MtmOnNodeDisconnect(int nodeId)
1918
1911
}
1919
1912
1920
1913
MtmSleep (MSEC_TO_USEC (MtmHeartbeatSendTimeout ));
1921
- MtmRefreshClusterStatus (false, 0 );
1914
+ MtmRefreshClusterStatus (false);
1922
1915
}
1923
1916
1924
1917
void MtmOnNodeConnect (int nodeId )
@@ -3087,12 +3080,7 @@ MtmReplicationStartupHook(struct PGLogicalStartupHookArgs* args)
3087
3080
MtmCheckQuorum ();
3088
3081
} else {
3089
3082
MtmUnlock ();
3090
- MtmRefreshClusterStatus (true, MtmReplicationNodeId );
3091
- MtmLock (LW_SHARED );
3092
- if (BIT_CHECK (Mtm -> disabledNodeMask , MtmReplicationNodeId - 1 )) {
3093
- MtmUnlock ();
3094
- elog (ERROR , "Disabled node %d tries to reconnect without recovery" , MtmReplicationNodeId );
3095
- }
3083
+ elog (ERROR , "Disabled node %d tries to reconnect without recovery" , MtmReplicationNodeId );
3096
3084
}
3097
3085
} else {
3098
3086
MTM_LOG1 ("Node %d start logical replication to node %d in normal mode" , MtmNodeId , MtmReplicationNodeId );
0 commit comments