@ -82,5 +82,6 @@ func (p *Pool) Put(s interface{}) {
continue
}
p.buckets[i].Put(slice.Slice(0, 0).Interface())
return
@ -662,11 +662,8 @@ mainLoop:
time.Since(last).Seconds(),
)
b, ok := sl.buffers.Get(sl.lastScrapeSize).([]byte)
if !ok {
b = make([]byte, 0, sl.lastScrapeSize)
level.Error(sl.l).Log("msg", "buffer pool type assertion error")
b := sl.buffers.Get(sl.lastScrapeSize).([]byte)
buf := bytes.NewBuffer(b)
scrapeErr := sl.scraper.scrape(scrapeCtx, buf)