Documentation ¶
Overview ¶
Package reconfig implements the Paxos reconfiguration mechanism, an alternative to Live Replacement.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Join ¶
type Join struct{}
Join is a message indicating that a standby replica started due to a reconfiguration should join the new configuration.
type ReconfigHandler ¶
type ReconfigHandler struct {
// contains filtered or unexported fields
}
ReconfigHandler represents a Goxos submodule handling startup for replicas joining a Goxos cluster as the result of a reconfiguration. The module is also responsible for starting reconfigurations based on failuire indications.
func NewReconfigHandler ¶
func NewReconfigHandler(id grp.ID, conf *config.Config, appID string, grpmgr grp.GroupManager, ld liveness.LeaderDetector, recMC chan rr.ReconfMsg, bcast chan<- interface{}, ucast chan<- net.Packet, dmx net.Demuxer, asrch chan<- app.StateReq, reconfCmdChan chan<- paxos.ReconfigCmd, stopCheckIn *sync.WaitGroup) *ReconfigHandler
NewReconfigHandler returns a new reconfiguration handler.
func (*ReconfigHandler) SetReconfigInProgress ¶
func (rh *ReconfigHandler) SetReconfigInProgress(inProgress bool)
SetReconfigInProgress is used to indicate if a reconfiguration is in progress or is complete.
func (*ReconfigHandler) SignalReconfCompleted ¶
func (rh *ReconfigHandler) SignalReconfCompleted()
func (*ReconfigHandler) Start ¶
func (rh *ReconfigHandler) Start()
Start starts the ReconfigHandler by spawning a goroutine to handle incoming and outgoing messages.
func (*ReconfigHandler) WaitForFirstSlot ¶
func (rh *ReconfigHandler) WaitForFirstSlot() paxos.SlotID
WaitForFirstSlot blocks until the replica receives the identifier for the first slot in a new configuration. The method returns this identifier. This method should be used by a new replica starting as part of a new configuration.
func (*ReconfigHandler) WaitForJoin ¶
func (rh *ReconfigHandler) WaitForJoin()
WaitForJoin blocks until the replica receives its first Join message from another replica in the new configuration. This method should be used by a new replica starting as part of a new configuration.