@@ -1628,8 +1628,8 @@ bool MtmRecoveryCaughtUp(int nodeId, XLogRecPtr slotLSN)
1628
1628
BIT_CLEAR (Mtm -> nodeLockerMask , nodeId - 1 );
1629
1629
Mtm -> nLockers -= 1 ;
1630
1630
} else {
1631
- MTM_LOG1 ("%d: node %d is caugth -up without locking cluster" , MyProcPid , nodeId );
1632
- /* We are lucky: caugth -up without locking cluster! */
1631
+ MTM_LOG1 ("%d: node %d is caught -up without locking cluster" , MyProcPid , nodeId );
1632
+ /* We are lucky: caught -up without locking cluster! */
1633
1633
}
1634
1634
MtmEnableNode (nodeId );
1635
1635
Mtm -> nConfigChanges += 1 ;
@@ -1779,9 +1779,9 @@ MtmBuildConnectivityMatrix(nodemask_t* matrix, bool nowait)
1779
1779
* Build connectivity graph, find clique in it and extend disabledNodeMask by nodes not included in clique.
1780
1780
* This function returns false if current node is excluded from cluster, true otherwise
1781
1781
*/
1782
- bool MtmRefreshClusterStatus (bool nowait , int testNodeId )
1782
+ bool MtmRefreshClusterStatus (bool nowait )
1783
1783
{
1784
- nodemask_t mask , clique , disabled , enabled ;
1784
+ nodemask_t mask , clique , disabled ;
1785
1785
nodemask_t matrix [MAX_NODES ];
1786
1786
int clique_size ;
1787
1787
int i ;
@@ -1822,13 +1822,6 @@ bool MtmRefreshClusterStatus(bool nowait, int testNodeId)
1822
1822
}
1823
1823
}
1824
1824
}
1825
- }
1826
- enabled = clique & Mtm -> disabledNodeMask ; /* new enabled nodes mask */
1827
- if (testNodeId != 0 && BIT_CHECK (enabled , testNodeId - 1 )) {
1828
- MtmEnableNode (testNodeId );
1829
- }
1830
-
1831
- if (disabled |enabled ) {
1832
1825
MtmCheckQuorum ();
1833
1826
}
1834
1827
#if 0
@@ -1908,7 +1901,7 @@ void MtmOnNodeDisconnect(int nodeId)
1908
1901
}
1909
1902
1910
1903
MtmSleep (MSEC_TO_USEC (MtmHeartbeatSendTimeout ));
1911
- MtmRefreshClusterStatus (false, 0 );
1904
+ MtmRefreshClusterStatus (false);
1912
1905
}
1913
1906
1914
1907
void MtmOnNodeConnect (int nodeId )
@@ -3077,12 +3070,7 @@ MtmReplicationStartupHook(struct PGLogicalStartupHookArgs* args)
3077
3070
MtmCheckQuorum ();
3078
3071
} else {
3079
3072
MtmUnlock ();
3080
- MtmRefreshClusterStatus (true, MtmReplicationNodeId );
3081
- MtmLock (LW_SHARED );
3082
- if (BIT_CHECK (Mtm -> disabledNodeMask , MtmReplicationNodeId - 1 )) {
3083
- MtmUnlock ();
3084
- elog (ERROR , "Disabled node %d tries to reconnect without recovery" , MtmReplicationNodeId );
3085
- }
3073
+ elog (ERROR , "Disabled node %d tries to reconnect without recovery" , MtmReplicationNodeId );
3086
3074
}
3087
3075
} else {
3088
3076
MTM_LOG1 ("Node %d start logical replication to node %d in normal mode" , MtmNodeId , MtmReplicationNodeId );
0 commit comments