Skip to content

perf(bloom): Compute chunkrefs for series right before sending task to builder #14808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 7, 2024
Prev Previous commit
Next Next commit
Add comment to proto.Task
  • Loading branch information
salvacorts committed Nov 7, 2024
commit a3cb73f111cdf6c7d0cfa1d8f8035bc7396b0483
19 changes: 1 addition & 18 deletions pkg/bloombuild/protos/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type Gap struct {
Blocks []bloomshipper.BlockRef
}

// Task is a convenience struct equivalent to the protobuf ProtoTask message but with Loki types.
type Task struct {
ID string

Expand All @@ -29,24 +30,6 @@ type Task struct {
Gaps []Gap
}

func NewTask(
table config.DayTable,
tenant string,
bounds v1.FingerprintBounds,
tsdb tsdb.SingleTenantTSDBIdentifier,
gaps []Gap,
) *Task {
return &Task{
ID: fmt.Sprintf("%s-%s-%s-%d", table.Addr(), tenant, bounds.String(), len(gaps)),

Table: table,
Tenant: tenant,
OwnershipBounds: bounds,
TSDB: tsdb,
Gaps: gaps,
}
}

func FromProtoTask(task *ProtoTask) (*Task, error) {
if task == nil {
return nil, nil
Expand Down
Loading