mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
lib/storage: document why tsid cache is reset before saving it to disk
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2205
This commit is contained in:
parent
b71be42d90
commit
6ff71474a6
1 changed files with 3 additions and 0 deletions
|
@ -725,6 +725,9 @@ func (s *Storage) mustRotateIndexDB() {
|
|||
}
|
||||
|
||||
func (s *Storage) resetAndSaveTSIDCache() {
|
||||
// Reset cache and then store the reset cache on disk in order to prevent
|
||||
// from inconsistent behaviour after possible unclean shutdown.
|
||||
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1347
|
||||
s.tsidCache.Reset()
|
||||
s.mustSaveCache(s.tsidCache, "MetricName->TSID", "metricName_tsid")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue