Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for replacing failed process groups in a fault domain #1943

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions api/v1beta2/foundationdbcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,14 @@ type AutomaticReplacementOptions struct {
// The default is false.
Enabled *bool `json:"enabled,omitempty"`

// FaultDomainBasedReplacements controls whether automatic replacements are targeting all failed process groups
// in a fault domain or only specific Process Groups. If this setting is enabled, the number of different fault
// domains that can have all their failed process groups replaced at the same time will be equal to MaxConcurrentReplacements.
// e.g. MaxConcurrentReplacements = 2 would mean that at most 2 different fault domains can have
// their failed process groups replaced at the same time.
// The default is false.
FaultDomainBasedReplacements *bool `json:"faultDomainBasedReplacements,omitempty"`
johscheuer marked this conversation as resolved.
Show resolved Hide resolved

// FailureDetectionTimeSeconds controls how long a process must be
// failed or missing before it is automatically replaced.
// The default is 7200 seconds, or 2 hours.
Expand Down Expand Up @@ -2155,6 +2163,12 @@ func (cluster *FoundationDBCluster) GetMaxConcurrentAutomaticReplacements() int
return pointer.IntDeref(cluster.Spec.AutomationOptions.Replacements.MaxConcurrentReplacements, 1)
}

// FaultDomainBasedReplacements returns true if the operator is allowed to replace all failed process groups of a
// fault domain. Default is false
func (cluster *FoundationDBCluster) FaultDomainBasedReplacements() bool {
return pointer.BoolDeref(cluster.Spec.AutomationOptions.Replacements.FaultDomainBasedReplacements, false)
}

// CoordinatorSelectionSetting defines the process class and the priority of it.
// A higher priority means that the process class is preferred over another.
type CoordinatorSelectionSetting struct {
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10194,6 +10194,8 @@ spec:
type: boolean
failureDetectionTimeSeconds:
type: integer
faultDomainBasedReplacements:
type: boolean
maxConcurrentReplacements:
default: 1
minimum: 0
Expand Down
Loading
Loading