Skip to content

Commit

Permalink
Build fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
  • Loading branch information
bwplotka committed Apr 20, 2021
1 parent b30021e commit 0c73663
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 0 additions & 2 deletions pkg/receive/hashring.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
"github.com/thanos-io/thanos/pkg/store/storepb/prompb"
)

const sep = '\xff'

// insufficientNodesError is returned when a hashring does not
// have enough nodes to satisfy a request for a node.
type insufficientNodesError struct {
Expand Down
10 changes: 5 additions & 5 deletions pkg/receive/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ func (r *Writer) Write(ctx context.Context, tenantID string, wreq *prompb.WriteR
}
getRef := app.(storage.GetRef)

var errs errutil.MultiError
var (
ref uint64
errs errutil.MultiError
)
for _, t := range wreq.Timeseries {
var (
ref uint64 = 0
lset = labelpb.ZLabelsToPromLabels(t.Labels)
)
lset := labelpb.ZLabelsToPromLabels(t.Labels)

// Check if the TSDB has cached reference for those labels.
ref, lset = getRef.GetRef(lset)
Expand Down
10 changes: 7 additions & 3 deletions pkg/rules/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

"github.com/go-kit/kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/prometheus/pkg/exemplar"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/rules"
Expand All @@ -35,9 +36,12 @@ func (n nopAppendable) Appender(_ context.Context) storage.Appender { return nop
type nopAppender struct{}

func (n nopAppender) Append(uint64, labels.Labels, int64, float64) (uint64, error) { return 0, nil }
func (n nopAppender) Commit() error { return nil }
func (n nopAppender) Rollback() error { return nil }
func (n nopAppender) Appender(_ context.Context) (storage.Appender, error) { return n, nil }
func (n nopAppender) AppendExemplar(uint64, labels.Labels, exemplar.Exemplar) (uint64, error) {
return 0, nil
}
func (n nopAppender) Commit() error { return nil }
func (n nopAppender) Rollback() error { return nil }
func (n nopAppender) Appender(_ context.Context) (storage.Appender, error) { return n, nil }

type nopQueryable struct{}

Expand Down

0 comments on commit 0c73663

Please sign in to comment.