Documentation
¶
Index ¶
- Constants
- func AllProcessesReady(logger logr.Logger, ...) error
- func AllProcessesReadyForExclusion(logger logr.Logger, ...) (map[fdbv1beta2.ProcessGroupID]time.Time, error)
- func GetAddressesFromCoordinationState(logger logr.Logger, adminClient fdbadminclient.AdminClient, ...) ([]fdbv1beta2.ProcessAddress, error)
- func GetAddressesFromStatus(logger logr.Logger, status *fdbv1beta2.FoundationDBStatus, ...) []fdbv1beta2.ProcessAddress
- func GetProcessesFromProcessMap(processGroupID fdbv1beta2.ProcessGroupID, ...) []fdbv1beta2.FoundationDBStatusProcessInfo
- func UpdateGlobalCoordinationState(logger logr.Logger, cluster *fdbv1beta2.FoundationDBCluster, ...) error
- type WaitTimeError
Constants ¶
const IgnoreMissingProcessDuration = 5 * time.Minute
IgnoreMissingProcessDuration defines the duration a Process Group must have the MissingProcess condition to be ignored in the exclusion check and let the exclusions potentially move forward. We should consider to make this configurable in the long term.
Variables ¶
This section is empty.
Functions ¶
func AllProcessesReady ¶
func AllProcessesReady( logger logr.Logger, pendingProcessGroups map[fdbv1beta2.ProcessGroupID]time.Time, readyProcessGroups map[fdbv1beta2.ProcessGroupID]time.Time, waitTime time.Duration, ) error
AllProcessesReady will return all the process groups that are in the pending and ready list. If the time since the last update was made is earlier than the wait time, a WaitTimeError will be returned.
func AllProcessesReadyForExclusion ¶
func AllProcessesReadyForExclusion( logger logr.Logger, pendingProcessGroups map[fdbv1beta2.ProcessGroupID]time.Time, readyProcessGroups map[fdbv1beta2.ProcessGroupID]time.Time, waitTime time.Duration, ) (map[fdbv1beta2.ProcessGroupID]time.Time, error)
AllProcessesReadyForExclusion will return all the process groups that are in the pending and ready list. If the time since the last update was made is earlier than the wait time, a WaitTimeError will be returned. It implements a similar logic to the AllProcessesReady with some modifications for the exclude reconciler to ensure that the excludes can mode forward.
func GetAddressesFromCoordinationState ¶ added in v2.5.0
func GetAddressesFromCoordinationState( logger logr.Logger, adminClient fdbadminclient.AdminClient, processGroups map[fdbv1beta2.ProcessGroupID]time.Time, includeLocalities bool, includeAddresses bool, ) ([]fdbv1beta2.ProcessAddress, error)
GetAddressesFromCoordinationState will return the addresses based on the coordination state. If addresses should be included, the process address(es) are included in the result, and if localities should be included, the localities are included in the result too.
func GetAddressesFromStatus ¶
func GetAddressesFromStatus( logger logr.Logger, status *fdbv1beta2.FoundationDBStatus, processGroups map[fdbv1beta2.ProcessGroupID]time.Time, ) []fdbv1beta2.ProcessAddress
GetAddressesFromStatus will return the process addresses for the provided processGroups based on the provided machine-readable status.
func GetProcessesFromProcessMap ¶ added in v2.5.0
func GetProcessesFromProcessMap( processGroupID fdbv1beta2.ProcessGroupID, processesMap map[fdbv1beta2.ProcessGroupID][]fdbv1beta2.FoundationDBStatusProcessInfo, ) []fdbv1beta2.FoundationDBStatusProcessInfo
GetProcessesFromProcessMap returns the slice of processes matching the process group ID.
func UpdateGlobalCoordinationState ¶
func UpdateGlobalCoordinationState( logger logr.Logger, cluster *fdbv1beta2.FoundationDBCluster, adminClient fdbadminclient.AdminClient, processesMap map[fdbv1beta2.ProcessGroupID][]fdbv1beta2.FoundationDBStatusProcessInfo, ) error
UpdateGlobalCoordinationState will update the state for global synchronization. If the synchronization mode is local, this method will skip all work.
Types ¶
type WaitTimeError ¶
type WaitTimeError struct {
// contains filtered or unexported fields
}
WaitTimeError represent and error when the last pending process groups was added earlier than the wait time allows.
func (WaitTimeError) Error ¶
func (err WaitTimeError) Error() string
Error returns the error string for this error.
func (WaitTimeError) GetWaitTime ¶
func (err WaitTimeError) GetWaitTime() time.Duration
GetWaitTime returns the difference between the wait time and the time since the last pending process group was added. The result can be used to delay the reconcile queue.