Follower Catchup Await
FOLLOWER_CATCHUP_AWAIT - wait for the leader's Archive to connect to the follower Log Subscription's Catchup endpoint, start recording the Log Subscription and ask the Clustered Service to join the Log, to start processing any new messages
On Entry¶
Enters from FOLLOWER_CATCHUP_INIT after creating its Log Subscription, adding the Catchup endpoint to it, and sending a CatchupPosition message to the leader, asking it to start the Catchup process.
Description¶
When the leader receives the CatchupPosition message, it asks its Archive to start replaying the Log Recording to the follower's Catchup endpoint. See onCatchupPosition for more details.
The follower waits for the Log Subscription to have an Image, i.e. for the leader's Archive Replay session to connect to it. Once it has an Image, it verifies that the Image starts at the same position as the follower's Log position (end of the follower's Log Recording).
It then asks its ConsensusModuleAgent to join the Log as follower. This is essentially the same process that the leader goes through in LEADER_INIT. In summary, it:
- starts recording the Log Subscription
- waits for the
rec-pos
counter and uses it as the AppendPosition Counter - sends a JoinLog to the Clustered Service to get it to subscribe to the Log and wait for it to send a ServiceAck.
After doing that, it moves to FOLLOWER_CATCHUP.
On Exit¶
The leader's Archive has connected to the Catchup endpoint on the follower's Log Subscription. The follower's Archive is recording the Log Subscription, and the Clustered Service has subscribed to it. The follower is ready to start receiving Log messages to catch up.
It moves to FOLLOWER_CATCHUP.