mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
lib/mergeset: properly calculate global metrics in UpdateStats()
Previously these metrics could be calculated multiple times for multiple mergeset.Table instances.
This commit is contained in:
parent
228d137936
commit
9224ede54f
1 changed files with 4 additions and 4 deletions
|
@ -337,11 +337,11 @@ func (tb *Table) UpdateMetrics(m *TableMetrics) {
|
|||
}
|
||||
tb.partsLock.Unlock()
|
||||
|
||||
m.DataBlocksCacheRequests += atomic.LoadUint64(&historicalDataBlockCacheRequests)
|
||||
m.DataBlocksCacheMisses += atomic.LoadUint64(&historicalDataBlockCacheMisses)
|
||||
m.DataBlocksCacheRequests = atomic.LoadUint64(&historicalDataBlockCacheRequests)
|
||||
m.DataBlocksCacheMisses = atomic.LoadUint64(&historicalDataBlockCacheMisses)
|
||||
|
||||
m.IndexBlocksCacheRequests += atomic.LoadUint64(&historicalIndexBlockCacheRequests)
|
||||
m.IndexBlocksCacheMisses += atomic.LoadUint64(&historicalIndexBlockCacheMisses)
|
||||
m.IndexBlocksCacheRequests = atomic.LoadUint64(&historicalIndexBlockCacheRequests)
|
||||
m.IndexBlocksCacheMisses = atomic.LoadUint64(&historicalIndexBlockCacheMisses)
|
||||
}
|
||||
|
||||
// AddItems adds the given items to the tb.
|
||||
|
|
Loading…
Reference in a new issue