Skip to content

Commit

Permalink
Merge pull request #208 from cole-miller/odd
Browse files Browse the repository at this point in the history
Don't require number of standbys to be odd
  • Loading branch information
Mathieu Borderé committed Sep 23, 2022
2 parents b869bdf + 0af626e commit 35a2398
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
5 changes: 0 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,6 @@ func New(dir string, options ...Option) (app *App, err error) {
return nil, fmt.Errorf("invalid voters %d: must be an odd number greater than 1", o.Voters)
}

if o.StandBys%2 == 0 {
stop()
return nil, fmt.Errorf("invalid stand-bys %d: must be an odd number", o.StandBys)
}

if runtime.GOOS != "linux" && nodeBindAddress[0] == '@' {
// Do not use abstract socket on other platforms and left trim "@"
nodeBindAddress = nodeBindAddress[1:]
Expand Down
2 changes: 0 additions & 2 deletions app/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ func WithVoters(n int) Option {
// All App instances in a cluster must be created with the same WithStandBys
// setting.
//
// The given value must be an odd number.
//
// The default value is 3.
func WithStandBys(n int) Option {
return func(options *options) {
Expand Down

0 comments on commit 35a2398

Please sign in to comment.