Compare commits

...

1 Commits

3 changed files with 10 additions and 3 deletions

View File

@@ -1379,6 +1379,5 @@ func GetMetricNamesStats(qt *querytracer.Tracer, limit, le int, matchPattern str
func ResetMetricNamesStats(qt *querytracer.Tracer) error {
qt = qt.NewChild("reset metric names usage stats")
defer qt.Done()
vmstorage.ResetMetricNamesStats(qt)
return nil
return vmstorage.ResetMetricNamesStats(qt)
}

View File

@@ -201,6 +201,9 @@ func DeleteSeries(qt *querytracer.Tracer, tfss []*storage.TagFilters, maxMetrics
// GetMetricNamesStats returns metric names usage stats with give limit and lte predicate
func GetMetricNamesStats(qt *querytracer.Tracer, limit, le int, matchPattern string) (storage.MetricNamesStatsResponse, error) {
if !*trackMetricNamesStats {
return storage.MetricNamesStatsResponse{}, fmt.Errorf("metrics usage feature must be enabled specifically using the `-storage.trackMetricNamesStats` flag")
}
WG.Add(1)
r := Storage.GetMetricNamesStats(qt, limit, le, matchPattern)
WG.Done()
@@ -208,10 +211,14 @@ func GetMetricNamesStats(qt *querytracer.Tracer, limit, le int, matchPattern str
}
// ResetMetricNamesStats resets state for metric names usage tracker
func ResetMetricNamesStats(qt *querytracer.Tracer) {
func ResetMetricNamesStats(qt *querytracer.Tracer) error {
if !*trackMetricNamesStats {
return fmt.Errorf("metrics usage feature must be enabled specifically using the `-storage.trackMetricNamesStats` flag")
}
WG.Add(1)
Storage.ResetMetricNamesStats(qt)
WG.Done()
return nil
}
// SearchMetricNames returns metric names for the given tfss on the given tr.

View File

@@ -34,6 +34,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/).
* BUGFIX: [vmsingle](https://docs.victoriametrics.com/single-server-victoriametrics/), `vminsert` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/) and [vmagent](https://docs.victoriametrics.com/vmagent/): support `identity` value in `Content-Encoding` HTTP header. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8649).
* BUGFIX: [vmsingle](https://docs.victoriametrics.com/single-server-victoriametrics/), `vminsert` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/) and [vmagent](https://docs.victoriametrics.com/vmagent/): fix timeseries with empty timestamp and value in Datadog sketches API. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8649).
* BUGFIX: [vmsingle](https://docs.victoriametrics.com/single-server-victoriametrics/), [vmagent](https://docs.victoriametrics.com/vmagent/), `vminsert` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): restore write concurrency limiter for data ingestion. The limiter was unintentionally removed in [v1.115.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.115.0) and potentially could lead to increased memory usage in certain scenarios. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/8742).
* BUGFIX: [vmsingle](https://docs.victoriametrics.com/single-server-victoriametrics/): return an error for the `/status/metric_names_stats` endpoints if the feature is not enabled with the `-storage.trackMetricNamesStats` flag.
## [v1.115.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.115.0)