Commit graph

5960 commits

Author SHA1 Message Date
Aliaksandr Valialkin
dc7f1cb019
lib/promscrape: fix TestGetStaticScrapeWorkSuccess test after ca67926952 2024-02-12 20:04:35 +02:00
Aliaksandr Valialkin
f2ef69a6f5
docs/CHANGELOG.md: cut v1.87.14 release 2024-02-01 16:32:20 +02:00
Aliaksandr Valialkin
015450044d
vendor: run make vendor-update 2024-02-01 16:27:44 +02:00
Aliaksandr Valialkin
4ca035a64f
deployment/docker: upgrade base Docker image from Alpine 3.19.0 to 3.19.1
See https://www.alpinelinux.org/posts/Alpine-3.19.1-released.html
2024-01-30 22:48:57 +02:00
Roman Khavronenko
3ed00ed592
lib/promscrape: respect 0 value for series_limit param (#5663)
* lib/promscrape: respect `0` value for `series_limit` param

Respect `0` value for `series_limit` param in `scrape_config`
even if global limit was set via `-promscrape.seriesLimitPerTarget`.
Previously, `0` value will be ignored in favor of `-promscrape.seriesLimitPerTarget`.

This behavior aligns with possibility to override `series_limit` value via
relabeling with `__series_limit__` label.

Signed-off-by: hagen1778 <roman@victoriametrics.com>

* Update docs/CHANGELOG.md

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2024-01-23 13:18:17 +02:00
Aliaksandr Valialkin
4b71f94e2b
app/vmselect: handle negative time range start in a generic manner inside NewSearchQuery()
This is a follow-up for cf03e11d89

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5553
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5630
2024-01-22 01:43:27 +02:00
Hui Wang
082a2dcd5e
app/vmselect/promql: properly handle possible negative results caused… (#5608)
* app/vmselect/promql: properly handle possible negative results caused by float operations precision error in rollup functions like rate() or increase()

* fix test
2024-01-22 01:07:56 +02:00
Nikolay
04925c4784
app/vmselect/netstorage (#5649)
* app/vmselect/netstorage

correctly handle errGlobal set

* wip

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5649

---------

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2024-01-22 01:04:01 +02:00
Roman Khavronenko
0247872612
app/vmselect: properly calculate start param for queries with too big look-behind window (#5630)
Properly determine time range search for instant queries with too big look-behind window like `foo[100y]`.
 Previously, such queries could return empty responses even if `foo` is present in database.

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5553

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-01-21 23:50:51 +02:00
Aliaksandr Valialkin
978ba15e2a
LICENSE: update the current year from 2023 to 2024 2024-01-17 01:49:06 +02:00
Aliaksandr Valialkin
3559a192f6
docs/CHANGELOG.md: typo fix 2024-01-17 01:02:46 +02:00
Aliaksandr Valialkin
c15b0769a6
docs/CHANGELOG.md: cut v1.87.13 2024-01-17 00:20:04 +02:00
Aliaksandr Valialkin
e749e2be57
deployment/docker: update Go builder from Go1.21.5 to Go1.21.6 2024-01-17 00:10:57 +02:00
Aliaksandr Valialkin
41bdf087a6
lib/pushmetrics: wait until the background goroutines, which push metrics, are stopped at pushmetrics.Stop()
Previously the was a race condition when the background goroutine still could try collecting metrics
from already stopped resources after returning from pushmetrics.Stop().
Now the pushmetrics.Stop() waits until the background goroutine is stopped before returning.

This is a follow-up for https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5549
and the commit fe2d9f6646 .

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5548
2024-01-16 23:40:35 +02:00
hagen1778
ce9cd9e3ea
app/all: follow-up after 84d710beab
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5548
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-01-16 23:39:31 +02:00
zhdd99
faaf6e8fd2
lib/pushmetrics: fix a panic caused by pushing metrics during the graceful shutdown process of vmstorage nodes. (#5549)
Co-authored-by: zhangdongdong <zhangdongdong@kuaishou.com>
Co-authored-by: Roman Khavronenko <roman@victoriametrics.com>
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-01-16 23:37:55 +02:00
Aliaksandr Valialkin
c008bbb91f
vendor: run make vendor-update 2024-01-16 23:00:02 +02:00
Aliaksandr Valialkin
a2366e3b75
lib/storage: follow-up for 4b8088e377
- Clarify the bugfix description at docs/CHANGELOG.md
- Simplify the code by accessing prefetchedMetricIDs struct under the lock
  instead of using lockless access to immutable struct.
  This shouldn't worsen code scalability too much on busy systems with many CPU cores,
  since the code executed under the lock is quite small and fast.
  This allows removing cloning of prefetchedMetricIDs struct every time
  new metric names are pre-fetched. This should reduce load on Go GC,
  since the cloning of uin64set.Set struct allocates many new objects.
2024-01-16 22:45:23 +02:00
Roman Khavronenko
30ff086f4d
lib/storage: properly check for storage/prefetchedMetricIDs cache expiration deadline (#5607)
Before, this cache was limited only by size.
Cache invalidation by time happens with jitter to prevent thundering herd problem.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-01-16 22:41:12 +02:00
Aliaksandr Valialkin
e175368935
app/vmselect/promql: simplify the code after 388d020b7c
Add a test, which verifies the correct sorting of float64 slices with NaNs.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5506
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5509
2024-01-16 22:37:03 +02:00
Aliaksandr Valialkin
90562a59a2
app/vmselect/promql: follow-up for ce4f26db02
- Document the bugfix at docs/CHANGELOG.md
- Filter out NaN values before sorting as suggested at https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5509#discussion_r1447369218
- Revert unrelated changes in lib/filestream and lib/fs
- Use simpler test at app/vmselect/promql/exec_test.go

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5509
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5506
2024-01-16 22:20:29 +02:00
Zongyang
b478c4f56f
FIX bottomk doesn't return any data when there are no time range overlap between timeseries (#5509)
* FIX sort order in bottomk

* Add lessWithNaNsReversed for bottomk

* Add ut for TopK

* Move lt from loop

* FIX lint

* FIX lint

* FIX lint

* Mod log format

---------

Co-authored-by: xiaozongyang <xiaozngyang@kanyun.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2024-01-16 22:19:51 +02:00
Aliaksandr Valialkin
d342f09917
app/vmstorage: addd missing -inmemoryDataFlushInterval command-line flag
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3337
2023-12-14 21:12:51 +02:00
Aliaksandr Valialkin
ddcc0efca4
docs/CHANGELOG.md: document the bugfix at 66c76a4d4d
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5414
2023-12-14 12:52:31 +02:00
Anton Tykhyy
9f67f62f96
Fix sum(aggr_over_time) 'got 1 args' error (#3028) (#5414)
app/vmselect/promql/eval.go:evalAggrFunc shunts evaluation
of AggrFuncExpr over rollupFunc over MetricsExpr to an optimized
path. tryGetArgRollupFuncWithMetricExpr() checks whether expression
can be shunted, but it mangles the AggrFuncExpr when the aggregation
function has more than one argument. This results in queries like
`sum(aggr_over_time("avg_over_time",m))` failing with error message
'expecting at least 2 args to "aggr_over_time"; got 1 args' while
the analogous query `sum(avg_over_time(m))` executes successfully.
This fix removes the unnecessary mangling.

Signed-off-by: Anton Tykhyy <atykhyy@gmail.com>
2023-12-14 12:51:31 +02:00
Aliaksandr Valialkin
1cfa94814b
vendor: run make vendor-update 2023-12-10 13:54:09 +02:00
Aliaksandr Valialkin
c731b9fb27
docs/CHANGELOG.md: cut v1.87.12 release 2023-12-10 13:46:19 +02:00
Aliaksandr Valialkin
f5c1c55c44
deployment/docker: update base Docker image from alpine:3.18.5 to alpine:3.19.0
See https://www.alpinelinux.org/posts/Alpine-3.19.0-released.html
2023-12-10 02:30:04 +02:00
Aliaksandr Valialkin
2eff6c9a82
Makefile: update golangci-lint version from v1.54.2 to v1.55.1
See https://github.com/golangci/golangci-lint/releases/tag/v1.55.1
2023-12-08 18:30:13 +02:00
hagen1778
a39f8f4e00
make: remove build duplicates for crossbuild
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-12-08 18:24:27 +02:00
Roman Khavronenko
92336db671
app/vmalert: sanitize label names before sending to Alertmanager (#5442)
Before, vmalert would send notifications with labels containing characters
  not supported by Alertmanager validator, resulting into validation errors
  like `msg="Failed to validate alerts" err="invalid label set: invalid name "foo.bar"`

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-12-08 18:11:49 +02:00
Aliaksandr Valialkin
2e17fe6d6a
app/vmselect/prometheus: properly encode Prometheus label values at /federate endpoint
Prometheus spec says that only \, \n and " must be escaped inside label values.
See 995743836e/content/docs/instrumenting/exposition_formats.md (L90)

See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5431
2023-12-07 16:13:48 +02:00
Aliaksandr Valialkin
bf3215a82f
deployment/docker: update Go builder from Go1.21.4 to Go1.21.5
See https://github.com/golang/go/issues?q=milestone%3AGo1.21.5+label%3ACherryPickApproved
2023-12-07 00:15:51 +02:00
Aliaksandr Valialkin
1e50bb8723
deployment/docker: update backe Docker image from alpine 3.18.4 to 3.18.5
See https://www.alpinelinux.org/posts/Alpine-3.15.11-3.16.8-3.17.6-3.18.5-released.html
2023-12-03 18:57:52 +02:00
Max Golionko
2034b62a23
CI: disable docker scan, enable auto release to sandbox (#4476)
* disable docker scan

* disable nightly, enable auto release to sandbox

* remove whitespace
2023-11-15 10:22:15 +01:00
Aliaksandr Valialkin
a6171f1b5b
vendor: run make vendor-update 2023-11-14 22:08:11 +01:00
Aliaksandr Valialkin
e3a7408feb
app/vmalert/datasource: test fix after 8a1b93a49d 2023-11-14 22:06:29 +01:00
Aliaksandr Valialkin
8bd1e2f459
docs/CHANGELOG.md: cut v1.87.11 LTS release 2023-11-14 21:55:49 +01:00
Nikolay
b1e08530fb
lib/querytracer: makes package concurrent safe to use (#5322)
* lib/querytracer: makes package concurrent safe to use
it must fix various issues with concurrent code usage.
Especially, when it's not reasonable to wait for all goroutines to be finished

* wip

---------

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-11-14 21:01:43 +01:00
Noah Labrecque
4c8f7a293e
fix: apply correct bounds to sf and tf (#5274) 2023-11-14 01:52:18 +01:00
Aliaksandr Valialkin
73d56fd5a4
deployment: update Go builder from Go1.21.3 to Go1.21.4
See https://github.com/golang/go/issues?q=milestone%3AGo1.21.4+label%3ACherryPickApproved
2023-11-13 18:31:33 +01:00
Aliaksandr Valialkin
44db8c9f46
lib/regexutil: properly handle alternate regexps surrounded by .+ or .*
Previously the following regexps were improperly handled:

  .+foo|bar.+
  .*foo|bar.*

This could lead to unexpected regexp match results.

See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5297

Thanks to @Haleygo for the initial attempt to fix the issue at https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5308
2023-11-13 18:29:00 +01:00
Aliaksandr Valialkin
f5ef2283c3
go.mod: increase the minimum supported Go version from Go1.19 to Go1.20 2023-11-02 21:30:46 +01:00
Aliaksandr Valialkin
511d1e5847
vendor: run make vendor-update 2023-11-02 21:18:17 +01:00
Aliaksandr Valialkin
e42af059a1
lib/persistentqueue: use the proper function call after 31945fb38d 2023-11-02 21:18:00 +01:00
Aliaksandr Valialkin
dc8bc5d6cd
go.mod: pin the latest working version of golang.org/x/exp and github.com/VictoriaMetrics/metricsql 2023-11-02 21:14:19 +01:00
Aliaksandr Valialkin
31945fb38d
lib/persistentqueue: properly re-create flock.lock file inside directory if persistent queue is broken.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5249

Thanks to @Sniper91 for the bugreport and initial fix at https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5233
2023-10-31 18:37:18 +01:00
Aliaksandr Valialkin
ed76b92c7d
lib/storage: follow-up for 29cebd82fb
Use atomic.CompareAndSwapUint32() instead of atomic.LoadUint32() followed by atomic.StoreUint32().
This makes the code more clear.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5159
2023-10-31 16:30:30 +01:00
Roman Khavronenko
bae069553e
lib/storage: log warning about RO mode only on state change (#5191)
Before, vmstorage would log the same message each second producing excessive
amount of logs.

See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5159

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-10-31 16:30:24 +01:00
Aliaksandr Valialkin
3284c9af81
docs/CHANGELOG.md: cut v1.87.10 2023-10-16 22:23:01 +02:00