(userID string)
| 1427 | } |
| 1428 | |
| 1429 | func (r *Ruler) getShardSizeForUser(userID string) int { |
| 1430 | newShardSize := util.DynamicShardSize(r.limits.RulerTenantShardSize(userID), r.ring.InstancesCount()) |
| 1431 | |
| 1432 | // We want to guarantee that shard size will be at least replication factor |
| 1433 | return max(newShardSize, r.cfg.Ring.ReplicationFactor) |
| 1434 | } |
| 1435 | |
| 1436 | func (r *Ruler) getShardedRules(ctx context.Context, userID string, rulesRequest RulesRequest) (*RulesResponse, error) { |
| 1437 | ring := ring.ReadRing(r.ring) |