Skip to content

Commit

Permalink
Fixed compact failed due to duplicate labels
Browse files Browse the repository at this point in the history
Signed-off-by: jojohappy <[email protected]>
  • Loading branch information
jojohappy committed Sep 28, 2018
1 parent b28f124 commit 67b402f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/block/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/oklog/ulid"
"github.com/pkg/errors"
Expand Down Expand Up @@ -282,7 +283,9 @@ 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 {
level.Error(logger).Log("msg", "duplicate labels in label set", "lset", lset, "series", id)
} else if l.Name < l0.Name {
return stats, errors.Errorf("out-of-order label set %s for series %d", lset, id)
}
l0 = l
Expand Down

0 comments on commit 67b402f

Please sign in to comment.