mirror of
https://github.com/prometheus/prometheus
synced 2024-12-24 15:32:48 +00:00
Scraping: drop series cache when resizing symbol table
Clear caches by restarting scraping loops: each loop assumes it has exclusive ownership of its cache, so we can't come in from another goroutine and change it. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
74b1f3daa6
commit
e6356e64bd
@ -376,6 +376,7 @@ func (sp *scrapePool) checkSymbolTable() {
|
||||
} else if sp.symbolTable.Len() > 2*sp.initialSymbolTableLen {
|
||||
sp.symbolTable = labels.NewSymbolTable()
|
||||
sp.initialSymbolTableLen = 0
|
||||
sp.restartLoops(false) // To drop all caches.
|
||||
}
|
||||
sp.lastSymbolTableCheck = time.Now()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user