-
Notifications
You must be signed in to change notification settings - Fork 3.7k
refactor(stringlabels): Support stringlabels in storage. #18103
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
base: main
Are you sure you want to change the base?
Conversation
I still have to run the benchmarks |
Here are the benchmark results
I've noted the once which show a slow down in the description. |
pkg/storage/stores/shipper/indexshipper/boltdb/compactor/series.go
Outdated
Show resolved
Hide resolved
ls.Range(func(l labels.Label) { | ||
if l.Name == TenantLabel { | ||
ls = append(ls[:i], ls[i+1:]...) | ||
break | ||
return | ||
} | ||
} | ||
return ls | ||
b.Add(l.Name, l.Value) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you thought about encapsulating this functionality into the ScratchBuilder
by adding a Remove(name string)
function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScratchBuilder is owned by Promtheus. I'm trying the "normal" builder.
@@ -45,3 +47,20 @@ func (p *PoolChunkRefs) Put(xs []ChunkRef) { | |||
//nolint:staticcheck | |||
p.pool.Put(xs) | |||
} | |||
|
|||
type PoolLabelsBuilder struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type PoolLabelsBuilder struct { | |
type LabelsBuilkderPool struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That conflicts with the variable above.
What this PR does / why we need it:
This is a next step of support Prometheus
stringlabels
implementation in Loki. It adds support in thestorage
package.Special notes for your reviewer:
The tests should compile with build tag
stringlabels
.Outstanding Performance Issues
Benchmark_store_SelectSample
bloom/v1
BenchmarkMapClear
BenchmarkNewMap
BenchmarkBlockQuerying
BenchmarkScalableBloomTestAndAdd
series.BenchmarkParseIndexEntries
series.index.BenchmarkEncode
Benchmark_BlocksCacheOld
tsdb
BenchmarkTenantHeads
BenchmarkTSDBIndex_Volume
Benchmark_MultiQueries
Checklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
deprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR