Documentation
¶
Index ¶
- Constants
- func AllProcessesReady(logger logr.Logger, ...) error
- func AllProcessesReadyForExclusion(logger logr.Logger, ...) (map[fdbv1beta2.ProcessGroupID]time.Time, error)
- func GetAddressesFromStatus(logger logr.Logger, status *fdbv1beta2.FoundationDBStatus, ...) []fdbv1beta2.ProcessAddress
- 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 GetAddressesFromStatus ¶
func GetAddressesFromStatus(logger logr.Logger, status *fdbv1beta2.FoundationDBStatus, processGroups map[fdbv1beta2.ProcessGroupID]time.Time, useLocalities bool) []fdbv1beta2.ProcessAddress
GetAddressesFromStatus will return the process addresses for the provided processGroups based on the provided machine-readable status.
func UpdateGlobalCoordinationState ¶
func UpdateGlobalCoordinationState(logger logr.Logger, cluster *fdbv1beta2.FoundationDBCluster, adminClient fdbadminclient.AdminClient) 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.