Skip to content
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

docs: add changelog about redis cache #4931

Merged
merged 3 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#4903](https://github.com/thanos-io/thanos/pull/4903) Compactor: Added tracing support for compaction.
- [#4909](https://github.com/thanos-io/thanos/pull/4909) Compactor: Add flag --max-time / --min-time to filter blocks that are ready to be compacted.
- [#4942](https://github.com/thanos-io/thanos/pull/4942) Tracing: add `traceid_128bit` support for jaeger.
- [#4888](https://github.com/thanos-io/thanos/pull/4888) Cache: support redis cache backend.

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion pkg/cacheutil/redis_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func NewRedisClientWithConfig(logger log.Logger, name string, config RedisClient
}
duration := promauto.With(reg).NewHistogramVec(prometheus.HistogramOpts{
Name: "thanos_redis_operation_duration_seconds",
Help: "Duration of operations against memcached.",
Help: "Duration of operations against redis.",
Buckets: []float64{0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.2, 0.5, 1, 3, 6, 10},
}, []string{"operation"})
c.durationSet = duration.WithLabelValues(opSet)
Expand Down
1 change: 0 additions & 1 deletion pkg/queryfrontend/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func (t thanosCacheKeyGenerator) GenerateCacheKey(userID string, r queryrange.Re
i := 0
for ; i < len(t.resolutions) && t.resolutions[i] > tr.MaxSourceResolution; i++ {
}
// Cache key should has a uniq prefix, We use `fe` represent frontend.
return fmt.Sprintf("fe:%s:%s:%d:%d:%d", userID, tr.Query, tr.Step, currentInterval, i)
case *ThanosLabelsRequest:
return fmt.Sprintf("fe:%s:%s:%s:%d", userID, tr.Label, tr.Matchers, currentInterval)
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/cache/caching_bucket_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func NewCachingBucketFromYaml(yamlContent []byte, bucket objstore.Bucket, logger
case string(RedisBucketCacheProvider):
redisCache, err := cacheutil.NewRedisClient(logger, "caching-bucket", backendConfig, reg)
if err != nil {
return nil, errors.Wrapf(err, "failed to create memcached client")
return nil, errors.Wrapf(err, "failed to create redis client")
}
c = cache.NewRedisCache("caching-bucket", logger, redisCache, reg)
default:
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/cache/memcached.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func NewRemoteIndexCache(logger log.Logger, cacheClient cacheutil.RemoteCacheCli
c.hits.WithLabelValues(cacheTypePostings)
c.hits.WithLabelValues(cacheTypeSeries)

level.Info(logger).Log("msg", "created cacheClient index cache")
level.Info(logger).Log("msg", "created index cache")

return c, nil
}
Expand Down