Oh, thank you. I roughly understand that if the new empty server S is not in the startup conf, S needs to fully receive the snapshot and log entries sent by the leader before S can start a FollowerState, right? If there are many snapshots and log entries, will the STARNING state of S last for a long time?
Tsz Wo Sze <[email protected]> 于2024年8月16日周五 00:34写道: > > ... why proto is not initilizing is needed. ... > > It is for bootstrapping a new, empty server S and letting it join an > existing cluster. > > S: When it starts, it transits NEW -> STARTING > S: It checks if it is in the startup conf. If yes, transits STARTING -> > RUNNING and starts a FollowerState. If no, remains in STARTING. > > The leader bootstraps S by sending a snapshot, if there is any, and log > entries. When the bootstrap process is ongoing, it > sets AppendEntriesRequestProto.initializing to true. Then, the server S > remains in STARTING and won't start a FollowerState since it is not ready. > > Tsz-Wo >
