Skip to content

Commit c649934

Browse files
committed
Fix nits
1 parent 91b9e0d commit c649934

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/ring/ring.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ type Ring struct {
9494

9595
// New creates a new Ring
9696
func New(cfg Config) (*Ring, error) {
97-
if 0 > cfg.ReplicationFactor {
97+
if cfg.ReplicationFactor <= 0 {
9898
return nil, fmt.Errorf("ReplicationFactor must be greater than zero: %d", cfg.ReplicationFactor)
9999
}
100100

@@ -171,7 +171,7 @@ func (r *Ring) Get(key uint32, op Operation) (ReplicationSet, error) {
171171
}
172172

173173
// BatchGet returns ReplicationFactor (or more) ingesters which form the replicas
174-
// for the given key. The order of the result matches the order of the input.
174+
// for the given keys. The order of the result matches the order of the input.
175175
func (r *Ring) BatchGet(keys []uint32, op Operation) ([]ReplicationSet, error) {
176176
r.mtx.RLock()
177177
defer r.mtx.RUnlock()

0 commit comments

Comments
 (0)