diff --git a/pkg/block/index.go b/pkg/block/index.go index eb0a3689c0..232bf40d37 100644 --- a/pkg/block/index.go +++ b/pkg/block/index.go @@ -347,7 +347,7 @@ func GatherIndexIssueStats(logger log.Logger, fn string, minTime int64, maxTime } l0 := lset[0] for _, l := range lset[1:] { - if l.Name <= l0.Name { + if l.Name < l0.Name { return stats, errors.Errorf("out-of-order label set %s for series %d", lset, id) } l0 = l diff --git a/pkg/compact/compact_e2e_test.go b/pkg/compact/compact_e2e_test.go index 11213dc047..dc6c7c1fd3 100644 --- a/pkg/compact/compact_e2e_test.go +++ b/pkg/compact/compact_e2e_test.go @@ -180,7 +180,7 @@ func TestGroup_Compact_e2e(t *testing.T) { extLset := labels.Labels{{Name: "e1", Value: "1"}} b1, err := testutil.CreateBlock(prepareDir, []labels.Labels{ {{Name: "a", Value: "1"}}, - {{Name: "a", Value: "2"}}, + {{Name: "a", Value: "2"}, {Name: "a", Value: "2"}}, {{Name: "a", Value: "3"}}, {{Name: "a", Value: "4"}}, }, 100, 0, 1000, extLset, 124)