From 8b32e7c3a060d8d8ccc6110505dd12ba8bc16cc7 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@gmail.com>
Date: Thu, 14 May 2020 23:23:39 +0300
Subject: [PATCH] lib/storage: reduce indentation in Storage.add

---
 lib/storage/storage.go | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/storage/storage.go b/lib/storage/storage.go
index 9b0db5cbc1..30b5dac5a0 100644
--- a/lib/storage/storage.go
+++ b/lib/storage/storage.go
@@ -1073,13 +1073,11 @@ func (s *Storage) add(rows []rawRow, mrs []MetricRow, precisionBits uint8) ([]ra
 			r.TSID = prevTSID
 			continue
 		}
-		if s.getTSIDFromCache(&r.TSID, mr.MetricNameRaw) {
-			if !dmis.Has(r.TSID.MetricID) {
-				// Fast path - the TSID for the given MetricName has been found in cache and isn't deleted.
-				prevTSID = r.TSID
-				prevMetricNameRaw = mr.MetricNameRaw
-				continue
-			}
+		if s.getTSIDFromCache(&r.TSID, mr.MetricNameRaw) && !dmis.Has(r.TSID.MetricID) {
+			// Fast path - the TSID for the given MetricName has been found in cache and isn't deleted.
+			prevTSID = r.TSID
+			prevMetricNameRaw = mr.MetricNameRaw
+			continue
 		}
 
 		// Slow path - the TSID is missing in the cache. Search for it in the index.