diff --git a/coordinator/points_writer.go b/coordinator/points_writer.go index e97c9c2dd2..55fddc4ddb 100644 --- a/coordinator/points_writer.go +++ b/coordinator/points_writer.go @@ -255,6 +255,9 @@ func (w *PointsWriter) MapShards(wp *WritePointsRequest) (*ShardMapping, error) mapping.Dropped = append(mapping.Dropped, p) atomic.AddInt64(&w.stats.WriteDropped, 1) continue + } else if len(sg.Shards) <= 0 { + // Shard groups should have at least one shard. + return nil, fmt.Errorf("shard group %d covering %s to %s has no shards", sg.ID, sg.StartTime, sg.EndTime) } sh := sg.ShardFor(p)