File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2334,7 +2334,7 @@ void MtmReceiverStarted(int nodeId)
23342334MtmReplicationMode MtmGetReplicationMode (int nodeId )
23352335{
23362336 bool recovery = false;
2337- while (Mtm -> status != MTM_CONNECTED && Mtm -> status != MTM_ONLINE ) {
2337+ if (Mtm -> status != MTM_CONNECTED && Mtm -> status != MTM_ONLINE ) {
23382338 MTM_LOG2 ("%d: receiver slot mode %s" , MyProcPid , MtmNodeStatusMnem [Mtm -> status ]);
23392339 if (Mtm -> status == MTM_RECOVERY ) {
23402340 recovery = true;
@@ -2351,6 +2351,7 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId)
23512351 }
23522352 /* delay opening of other slots until recovery is completed */
23532353 MtmSleep (STATUS_POLL_DELAY );
2354+ return REPLMODE_UNKNOWN ;
23542355 }
23552356 if (recovery ) {
23562357 MTM_LOG1 ("Recreate replication slot for node %d after end of recovery" , nodeId );
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ typedef enum
117117
118118typedef enum
119119{
120+ REPLMODE_UNKNOWN , /* receiver should wait */
120121 REPLMODE_RECOVERED , /* recovery of node is completed so drop old slot and restart replication from the current position in WAL */
121122 REPLMODE_RECOVERY , /* perform recorvery of the node by applying all data from the slot from specified point */
122123 REPLMODE_NORMAL /* normal mode: use existed slot or create new one and start receiving data from it from the specified position */
You can’t perform that action at this time.
0 commit comments