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
8000
@@ -2325,7 +2325,7 @@ void MtmReceiverStarted(int nodeId)
23252325MtmReplicationMode MtmGetReplicationMode (int nodeId )
23262326{
23272327 bool recovery = false;
2328- while (Mtm -> status != MTM_CONNECTED && Mtm -> status != MTM_ONLINE ) {
2328+ if (Mtm -> status != MTM_CONNECTED && Mtm -> status != MTM_ONLINE ) {
23292329 MTM_LOG2 ("%d: receiver slot mode %s" , MyProcPid , MtmNodeStatusMnem [Mtm -> status ]);
23302330 if (Mtm -> status == MTM_RECOVERY ) {
23312331 recovery = true;
@@ -2342,6 +2342,7 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId)
23422342 }
23432343 /* delay opening of other slots until recovery is completed */
23442344 MtmSleep (STATUS_POLL_DELAY );
2345+ return REPLMODE_UNKNOWN ;
23452346 }
23462347 if (recovery ) {
23472348 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