mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34: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
|
||||
}
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue