From 4fa3b3c4313f724b491d3109b9a6c8e46e9f7f5e Mon Sep 17 00:00:00 2001 From: Mauro Stettler Date: Thu, 7 Sep 2017 15:11:11 +0200 Subject: [PATCH] fix the cache bug oppressed stats --- mdata/cache/ccache_metric.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdata/cache/ccache_metric.go b/mdata/cache/ccache_metric.go index b6f240f354..ed15d41b00 100644 --- a/mdata/cache/ccache_metric.go +++ b/mdata/cache/ccache_metric.go @@ -204,7 +204,7 @@ func (mc *CCacheMetric) searchForward(ctx context.Context, metric string, from, res.Complete = true break } - if ts >= mc.chunks[ts].Next { + if mc.chunks[ts].Next != 0 && ts >= mc.chunks[ts].Next { log.Warn("CCacheMetric: suspected bug suppressed. searchForward(%q, %d, %d, res) ts is %d while Next is %d", metric, from, until, ts, mc.chunks[ts].Next) span := opentracing.SpanFromContext(ctx) span.SetTag("searchForwardBug", true)