Comment fixes (#364)

* matcher.go: restore comment from upstream

There's no reason to remove this comment.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

* head_append.go: Cortex to Mimir

This repo is used in Mimir.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
George Krajcsovits 2022-11-23 13:26:20 +01:00 committed by GitHub
parent 14ea52695c
commit 71fee62838
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -111,6 +111,7 @@ func (m *Matcher) Inverse() (*Matcher, error) {
panic("labels.Matcher.Matches: invalid match type")
}
// GetRegexString returns the regex string.
func (m *Matcher) GetRegexString() string {
if m.re == nil {
return ""

View file

@ -1168,7 +1168,7 @@ func addJitterToChunkEndTime(seriesHash uint64, chunkMinTime, nextAt, maxNextAt
}
// Compute the variance to apply to the chunk end time. The variance is based on the series hash so that
// different TSDBs ingesting the same exact samples (e.g. in a distributed system like Cortex) will have
// different TSDBs ingesting the same exact samples (e.g. in a distributed system like Mimir) will have
// the same chunks for a given period.
chunkDuration := nextAt - chunkMinTime
chunkDurationMaxVariance := int64(float64(chunkDuration) * variance)