diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 8d92d99e5..1cdb76580 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -25,6 +25,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [vmagent dashboard](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards/vmagent.json): fix legend captions for stream aggregation related panels. Before they were displaying wrong label names. * BUGFIX: [vmgateway](https://docs.victoriametrics.com/vmgateway/): add missing `datadog`, `newrelic`, `opentelemetry` and `pushgateway` routes to the `JWT` authorization routes. Allows prefixed (`promtheus/graphite`) routes for query requests. +* BUGFIX: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): fix metric `vm_object_references{type="indexdb"}`. Previously, it was overcounted. ## [v1.103.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.103.0) diff --git a/lib/storage/index_db.go b/lib/storage/index_db.go index 9c88678c9..d9a1939db 100644 --- a/lib/storage/index_db.go +++ b/lib/storage/index_db.go @@ -224,6 +224,9 @@ func (db *indexDB) UpdateMetrics(m *IndexDBMetrics) { m.TagFiltersToMetricIDsCacheMisses += cs.Misses m.IndexDBRefCount += uint64(db.refCount.Load()) + + // this shouldn't increase the MissingTSIDsForMetricID value, + // as we only count it as missingTSIDs if it can't be found in both the current and previous indexdb. m.MissingTSIDsForMetricID += db.missingTSIDsForMetricID.Load() m.DateRangeSearchCalls += db.dateRangeSearchCalls.Load() @@ -252,7 +255,6 @@ func (db *indexDB) UpdateMetrics(m *IndexDBMetrics) { m.GlobalSearchCalls += extDB.globalSearchCalls.Load() m.MissingMetricNamesForMetricID += extDB.missingMetricNamesForMetricID.Load() - m.IndexDBRefCount += uint64(extDB.refCount.Load()) }) }