Skip to content

Commit de92875

Browse files
committed
Handle normalised ring in TokensFor()
Signed-off-by: Bryan Boreham <[email protected]>
1 parent eebca6d commit de92875

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/ring/model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func (d *Desc) Ready(heartbeatTimeout time.Duration) error {
143143
// TokensFor partitions the tokens into those for the given ID, and those for others.
144144
func (d *Desc) TokensFor(id string) (tokens, other []uint32) {
145145
var takenTokens, myTokens []uint32
146-
for _, token := range d.Tokens {
146+
for _, token := range migrateRing(d) {
147147
takenTokens = append(takenTokens, token.Token)
148148
if token.Ingester == id {
149149
myTokens = append(myTokens, token.Token)

0 commit comments

Comments
 (0)