Skip to content

Commit

Permalink
BUG: BFReserveArgs - error_rate & capacity (#2763)
Browse files Browse the repository at this point in the history
the error_rate and capacity parameters should not be
optional - corrected
  • Loading branch information
nic-gibson committed Oct 30, 2023
1 parent 343016b commit 84f46c3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions probabilistic.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,7 @@ func (c cmdable) BFReserveNonScaling(ctx context.Context, key string, errorRate
func (c cmdable) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd {
args := []interface{}{"BF.RESERVE", key}
if options != nil {
if options.Error != 0 {
args = append(args, options.Error)
}
if options.Capacity != 0 {
args = append(args, options.Capacity)
}
args = append(args, options.Error, options.Capacity)
if options.Expansion != 0 {
args = append(args, "EXPANSION", options.Expansion)
}
Expand Down

0 comments on commit 84f46c3

Please sign in to comment.