You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@
47
47
*[ENHANCEMENT] Add de-duplicated chunks counter `cortex_chunk_store_deduped_chunks_total` which counts every chunk not sent to the store because it was already sent by another replica. #2485
48
48
*[ENHANCEMENT] query-frontend now also logs the POST data of long queries. #2481
49
49
*[ENHANCEMENT] Experimental WAL: Ingester WAL records now have type header and the custom WAL records have been replaced by Prometheus TSDB's WAL records. Old records will not be supported from 1.3 onwards. Note: once this is deployed, you cannot downgrade without data loss. #2436
50
+
*[ENHANCEMENT] Redis Cache: Added `idle_timeout`, `wait_on_pool_exhaustion` and `max_conn_lifetime` options to redis cache configuration. #2550
50
51
*[BUGFIX] Ruler: Ensure temporary rule files with special characters are properly mapped and cleaned up. #2506
51
52
*[BUGFIX] Fixes #2411, Ensure requests are properly routed to the prometheus api embedded in the query if `-server.path-prefix` is set. #2372
52
53
*[BUGFIX] Experimental TSDB: fixed chunk data corruption when querying back series using the experimental blocks storage. #2400
f.IntVar(&cfg.MaxActiveConns, prefix+"redis.max-active-conns", 0, description+"Maximum number of active connections in pool.")
41
44
f.Var(&cfg.Password, prefix+"redis.password", description+"Password to use when connecting to redis.")
42
45
f.BoolVar(&cfg.EnableTLS, prefix+"redis.enable-tls", false, description+"Enables connecting to redis with TLS.")
46
+
f.DurationVar(&cfg.IdleTimeout, prefix+"redis.idle-timeout", 0, description+"Close connections after remaining idle for this duration. If the value is zero, then idle connections are not closed.")
47
+
f.BoolVar(&cfg.WaitOnPoolExhaustion, prefix+"redis.wait-on-pool-exhaustion", false, description+"Enables waiting if there are no idle connections. If the value is false and the pool is at the max_active_conns limit, the pool will return a connection with ErrPoolExhausted error and not wait for idle connections.")
48
+
f.DurationVar(&cfg.MaxConnLifetime, prefix+"redis.max-conn-lifetime", 0, description+"Close connections older than this duration. If the value is zero, then the pool does not close connections based on age.")
43
49
}
44
50
45
51
// NewRedisCache creates a new RedisCache
@@ -48,8 +54,6 @@ func NewRedisCache(cfg RedisConfig, name string, pool *redis.Pool) *RedisCache {
48
54
// pool != nil only in unit tests
49
55
ifpool==nil {
50
56
pool=&redis.Pool{
51
-
MaxIdle: cfg.MaxIdleConns,
52
-
MaxActive: cfg.MaxActiveConns,
53
57
Dial: func() (redis.Conn, error) {
54
58
options:=make([]redis.DialOption, 0, 2)
55
59
ifcfg.EnableTLS {
@@ -65,6 +69,11 @@ func NewRedisCache(cfg RedisConfig, name string, pool *redis.Pool) *RedisCache {
0 commit comments