From dd4892dcad81f558b3b6f05924e7641f37cb5127 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Fri, 7 Mar 2014 14:33:13 +0100 Subject: [PATCH] Ensure no ops are leaked in renderView(). Change-Id: I6970a9098be305fcd010d46443b040d864d9740a --- storage/metric/tiered.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/metric/tiered.go b/storage/metric/tiered.go index b69f9edf9..9439b09b6 100644 --- a/storage/metric/tiered.go +++ b/storage/metric/tiered.go @@ -422,6 +422,8 @@ func (t *TieredStorage) renderView(viewJob viewJob) { extractionTimer := viewJob.stats.GetTimer(stats.ViewDataExtractionTime).Start() for viewJob.builder.HasOp() { op := viewJob.builder.PopOp() + defer giveBackOp(op) + fp := op.Fingerprint() old, err := t.seriesTooOld(fp, op.CurrentTime()) if err != nil { @@ -525,7 +527,6 @@ func (t *TieredStorage) renderView(viewJob viewJob) { view.appendSamples(fp, op.ExtractSamples(Values(currentChunk))) } } - giveBackOp(op) } extractionTimer.Stop()