Skip to content

Commit 0602b90

Browse files
authored
refactor(blooms): Better task naming (#13361)
1 parent 86fbfff commit 0602b90

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pkg/bloombuild/protos/compat.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package protos
33
import (
44
"fmt"
55

6-
"github.com/google/uuid"
76
"github.com/pkg/errors"
87
"github.com/prometheus/common/model"
98

@@ -28,9 +27,15 @@ type Task struct {
2827
Gaps []GapWithBlocks
2928
}
3029

31-
func NewTask(table config.DayTable, tenant string, bounds v1.FingerprintBounds, tsdb tsdb.SingleTenantTSDBIdentifier, gaps []GapWithBlocks) *Task {
30+
func NewTask(
31+
table config.DayTable,
32+
tenant string,
33+
bounds v1.FingerprintBounds,
34+
tsdb tsdb.SingleTenantTSDBIdentifier,
35+
gaps []GapWithBlocks,
36+
) *Task {
3237
return &Task{
33-
ID: uuid.NewString(),
38+
ID: fmt.Sprintf("%s-%s-%s-%d-%d", table.Addr(), tenant, bounds.String(), tsdb.Checksum, len(gaps)),
3439

3540
Table: table,
3641
Tenant: tenant,

0 commit comments

Comments
 (0)