Skip to content

Commit

Permalink
Prefix chunks cache flags.
Browse files Browse the repository at this point in the history
Fixes cortexproject#2191

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
  • Loading branch information
gouthamve committed Mar 24, 2020
1 parent acc42ab commit 7488756
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

## master / unreleased

* [CHANGE] Renamed the chunk cache flags to have `store.chunks-cache.` as prefix. This means the following flags have been changed:
- `-cache.enable-fifocache` --> `-store.chunks-cache.cache.enable-fifocache`
- `-default-validity` --> `-store.chunks-cache.default-validity`
- `-fifocache.duration` --> `-store.chunks-cache.fifocache.duration`
- `-fifocache.size` --> `-store.chunks-cache.fifocache.size`
- `-memcache.write-back-buffer` --> `-store.chunks-cache.memcache.write-back-buffer`
- `-memcache.write-back-goroutines` --> `-store.chunks-cache.memcache.write-back-goroutines`
- `-memcached.batchsize` --> `-store.chunks-cache.memcached.batchsize`
- `-memcached.consistent-hash` --> `-store.chunks-cache.memcached.consistent-hash`
- `-memcached.expiration` --> `-store.chunks-cache.memcached.expiration`
- `-memcached.hostname` --> `-store.chunks-cache.memcached.hostname`
- `-memcached.max-idle-conns` --> `-store.chunks-cache.memcached.max-idle-conns`
- `-memcached.parallelism` --> `-store.chunks-cache.memcached.parallelism`
- `-memcached.service` --> `-store.chunks-cache.memcached.service`
- `-memcached.timeout` --> `-store.chunks-cache.memcached.timeout`
- `-memcached.update-interval` --> `-store.chunks-cache.memcached.update-interval`
- `-redis.enable-tls` --> `-store.chunks-cache.redis.enable-tls`
- `-redis.endpoint` --> `-store.chunks-cache.redis.endpoint`
- `-redis.expiration` --> `-store.chunks-cache.redis.expiration`
- `-redis.max-active-conns` --> `-store.chunks-cache.redis.max-active-conns`
- `-redis.max-idle-conns` --> `-store.chunks-cache.redis.max-idle-conns`
- `-redis.password` --> `-store.chunks-cache.redis.password`
- `-redis.timeout` --> `-store.chunks-cache.redis.timeout`
* [CHANGE] Rename the `-store.chunk-cache-stubs` to `-store.chunk-cache.cache-stubs` to be more inline with above.
* [CHANGE] Don't support mixed time units anymore for duration. For example, 168h5m0s doesn't work anymore, please use just one unit (s|m|h|d|w|y). #2252
* [CHANGE] Utilize separate protos for rule state and storage. Experimental ruler API will not be functional until the rollout is complete. #2226
* [CHANGE] Frontend worker in querier now starts after all Querier module dependencies are started. This fixes issue where frontend worker started to send queries to querier before it was ready to serve them (mostly visible when using experimental blocks storage). #2246
Expand Down
4 changes: 2 additions & 2 deletions pkg/chunk/chunk_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ type StoreConfig struct {

// RegisterFlags adds the flags required to config this to the given FlagSet
func (cfg *StoreConfig) RegisterFlags(f *flag.FlagSet) {
cfg.ChunkCacheConfig.RegisterFlagsWithPrefix("", "Cache config for chunks. ", f)
f.BoolVar(&cfg.chunkCacheStubs, "store.chunk-cache-stubs", false, "If true, don't write the full chunk to cache, just a stub entry.")
cfg.ChunkCacheConfig.RegisterFlagsWithPrefix("store.chunks-cache.", "Cache config for chunks. ", f)
f.BoolVar(&cfg.chunkCacheStubs, "store.chunk-cache.cache-stubs", false, "If true, don't write the full chunk to cache, just a stub entry.")
cfg.WriteDedupeCacheConfig.RegisterFlagsWithPrefix("store.index-cache-write.", "Cache config for index entry writing. ", f)

f.DurationVar(&cfg.CacheLookupsOlderThan, "store.cache-lookups-older-than", 0, "Cache index entries older than this period. 0 to disable.")
Expand Down

0 comments on commit 7488756

Please sign in to comment.