mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
lib/storage: reduce indentation in Storage.add
This commit is contained in:
parent
71d29a8fa1
commit
1b5d272e07
1 changed files with 5 additions and 7 deletions
|
@ -1139,14 +1139,12 @@ func (s *Storage) add(rows []rawRow, mrs []MetricRow, precisionBits uint8) ([]ra
|
||||||
r.TSID = prevTSID
|
r.TSID = prevTSID
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if s.getTSIDFromCache(&r.TSID, mr.MetricNameRaw) {
|
if s.getTSIDFromCache(&r.TSID, mr.MetricNameRaw) && !dmis.Has(r.TSID.MetricID) {
|
||||||
if !dmis.Has(r.TSID.MetricID) {
|
|
||||||
// Fast path - the TSID for the given MetricName has been found in cache and isn't deleted.
|
// Fast path - the TSID for the given MetricName has been found in cache and isn't deleted.
|
||||||
prevTSID = r.TSID
|
prevTSID = r.TSID
|
||||||
prevMetricNameRaw = mr.MetricNameRaw
|
prevMetricNameRaw = mr.MetricNameRaw
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Slow path - the TSID is missing in the cache. Search for it in the index.
|
// Slow path - the TSID is missing in the cache. Search for it in the index.
|
||||||
if is == nil {
|
if is == nil {
|
||||||
|
|
Loading…
Reference in a new issue