From e27b797ec959af080f638d79f1c01b8aa3f2f112 Mon Sep 17 00:00:00 2001 From: Goutham Veeramachaneni Date: Mon, 30 Mar 2020 18:43:43 +0200 Subject: [PATCH] Saner defaults for configs (#2344) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Saner defaults for configs Signed-off-by: Goutham Veeramachaneni * Set spread_flushes to true in the code. Signed-off-by: Tom Wilkie * Make mockIngester implement HealthCheck and io.Closer so tests pass. Signed-off-by: Tom Wilkie * Address feedback Signed-off-by: Goutham Veeramachaneni * Verify that querier sees correct ring before using it. Signed-off-by: Peter Štibraný * Address feedback Signed-off-by: Goutham Veeramachaneni Co-authored-by: Tom Wilkie Co-authored-by: Peter Štibraný --- cache/memcached.go | 2 +- cache/memcached_client.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cache/memcached.go b/cache/memcached.go index 3319110e9713..0b14180e11f4 100644 --- a/cache/memcached.go +++ b/cache/memcached.go @@ -50,7 +50,7 @@ type MemcachedConfig struct { // RegisterFlagsWithPrefix adds the flags required to config this to the given FlagSet func (cfg *MemcachedConfig) RegisterFlagsWithPrefix(prefix, description string, f *flag.FlagSet) { f.DurationVar(&cfg.Expiration, prefix+"memcached.expiration", 0, description+"How long keys stay in the memcache.") - f.IntVar(&cfg.BatchSize, prefix+"memcached.batchsize", 0, description+"How many keys to fetch in each batch.") + f.IntVar(&cfg.BatchSize, prefix+"memcached.batchsize", 1024, description+"How many keys to fetch in each batch.") f.IntVar(&cfg.Parallelism, prefix+"memcached.parallelism", 100, description+"Maximum active requests to memcache.") } diff --git a/cache/memcached_client.go b/cache/memcached_client.go index 131b60a4046c..ed97f12b15ee 100644 --- a/cache/memcached_client.go +++ b/cache/memcached_client.go @@ -75,7 +75,7 @@ func (cfg *MemcachedClientConfig) RegisterFlagsWithPrefix(prefix, description st f.IntVar(&cfg.MaxIdleConns, prefix+"memcached.max-idle-conns", 16, description+"Maximum number of idle connections in pool.") f.DurationVar(&cfg.Timeout, prefix+"memcached.timeout", 100*time.Millisecond, description+"Maximum time to wait before giving up on memcached requests.") f.DurationVar(&cfg.UpdateInterval, prefix+"memcached.update-interval", 1*time.Minute, description+"Period with which to poll DNS for memcache servers.") - f.BoolVar(&cfg.ConsistentHash, prefix+"memcached.consistent-hash", false, description+"Use consistent hashing to distribute to memcache servers.") + f.BoolVar(&cfg.ConsistentHash, prefix+"memcached.consistent-hash", true, description+"Use consistent hashing to distribute to memcache servers.") } // NewMemcachedClient creates a new MemcacheClient that gets its server list