mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
stupid return mistake fix, and dropped the additional assertion check!
This commit is contained in:
parent
9b7f0cfa88
commit
933ab8a34e
|
@ -82,5 +82,6 @@ func (p *Pool) Put(s interface{}) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
p.buckets[i].Put(slice.Slice(0, 0).Interface())
|
p.buckets[i].Put(slice.Slice(0, 0).Interface())
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -662,11 +662,8 @@ mainLoop:
|
||||||
time.Since(last).Seconds(),
|
time.Since(last).Seconds(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
b, ok := sl.buffers.Get(sl.lastScrapeSize).([]byte)
|
|
||||||
if !ok {
|
b := sl.buffers.Get(sl.lastScrapeSize).([]byte)
|
||||||
b = make([]byte, 0, sl.lastScrapeSize)
|
|
||||||
level.Error(sl.l).Log("msg", "buffer pool type assertion error")
|
|
||||||
}
|
|
||||||
buf := bytes.NewBuffer(b)
|
buf := bytes.NewBuffer(b)
|
||||||
|
|
||||||
scrapeErr := sl.scraper.scrape(scrapeCtx, buf)
|
scrapeErr := sl.scraper.scrape(scrapeCtx, buf)
|
||||||
|
|
Loading…
Reference in a new issue