mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01: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
ee066aa0d5
commit
63bc89dd81
@ -740,6 +740,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 New Issue
Block a user