From 68ea3d18f7645f08212d21d3555730ea7f91ca47 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 15 Sep 2021 09:16:28 +0300 Subject: [PATCH] vendor: update github.com/valyala/histogram from v1.1.2 to v1.2.0 This fixes the non-repeatable quantile_over_time() results when the number of input samples exceeds 1000. See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1612 --- docs/CHANGELOG.md | 1 + go.mod | 6 +++--- go.sum | 10 ++++++---- vendor/github.com/VictoriaMetrics/metrics/go.mod | 2 +- vendor/github.com/VictoriaMetrics/metrics/go.sum | 8 ++++---- vendor/github.com/valyala/fastrand/fastrand.go | 5 +++++ vendor/github.com/valyala/histogram/go.mod | 2 +- vendor/github.com/valyala/histogram/go.sum | 4 ++-- vendor/github.com/valyala/histogram/histogram.go | 4 ++++ vendor/modules.txt | 6 +++--- 10 files changed, 30 insertions(+), 18 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 874861513..189224ec7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -28,6 +28,7 @@ sort: 15 * BUGFIX: use Prometheus-compatible label value formatting for [count_values](https://docs.victoriametrics.com/MetricsQL.html#count_values) function. Previously big values could be improperly formatted, which could break query results, which rely on label value such as `... on(label) count_values("label", ...)`. * BUGFIX: vmagent: properly use `https` scheme for wildcard TLS certificates for `role: ingress` targets in Kubernetes service discovery. See [this issue](https://github.com/prometheus/prometheus/issues/8902). * BUGFIX: vmagent: support host networking mode for `docker_sd_config`. See [this issue](https://github.com/prometheus/prometheus/issues/9116). +* BUGFIX: fix non-repeatable results from `quantile_over_time()` function when the number of input samples exceeds 1000. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1612). ## [v1.65.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.65.0) diff --git a/go.mod b/go.mod index 0e3974024..16b81d471 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( // Do not use the original github.com/valyala/fasthttp because of issues // like https://github.com/valyala/fasthttp/commit/996610f021ff45fdc98c2ce7884d5fa4e7f9199b github.com/VictoriaMetrics/fasthttp v1.0.16 - github.com/VictoriaMetrics/metrics v1.17.3 + github.com/VictoriaMetrics/metrics v1.18.0 github.com/VictoriaMetrics/metricsql v0.21.0 github.com/VividCortex/ewma v1.2.0 // indirect github.com/aws/aws-sdk-go v1.40.41 @@ -29,10 +29,10 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20201119142752-3ad25a6dc3d9 github.com/urfave/cli/v2 v2.3.0 github.com/valyala/fastjson v1.6.3 - github.com/valyala/fastrand v1.0.0 + github.com/valyala/fastrand v1.1.0 github.com/valyala/fasttemplate v1.2.1 github.com/valyala/gozstd v1.12.0 - github.com/valyala/histogram v1.1.2 + github.com/valyala/histogram v1.2.0 github.com/valyala/quicktemplate v1.6.3 go.uber.org/atomic v1.9.0 // indirect golang.org/x/net v0.0.0-20210908191846-a5e095526f91 diff --git a/go.sum b/go.sum index f80728406..3fd55fb51 100644 --- a/go.sum +++ b/go.sum @@ -107,8 +107,8 @@ github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNu github.com/VictoriaMetrics/fasthttp v1.0.16 h1:rLonAIxZWUq0V4a1yJeuIeHZ/zSneR+gWrXF3A1xTqE= github.com/VictoriaMetrics/fasthttp v1.0.16/go.mod h1:s9o5H4T58Kt4CTrdyJp4RorBKCwY7gRVS3N2JAUJ9jw= github.com/VictoriaMetrics/metrics v1.12.2/go.mod h1:Z1tSfPfngDn12bTfZSCqArT3OPY3u88J12hSoOhuiRE= -github.com/VictoriaMetrics/metrics v1.17.3 h1:QPUakR6JRy8BhL2C2kOgYKLuoPDwtJQ+7iKIZSjt1A4= -github.com/VictoriaMetrics/metrics v1.17.3/go.mod h1:Z1tSfPfngDn12bTfZSCqArT3OPY3u88J12hSoOhuiRE= +github.com/VictoriaMetrics/metrics v1.18.0 h1:vov5NxDHRSXFbdiH4dYLYEjKLoAXXSQ7hcnG8TSD9JQ= +github.com/VictoriaMetrics/metrics v1.18.0/go.mod h1:ArjwVz7WpgpegX/JpB0zpNF2h2232kErkEnzH1sxMmA= github.com/VictoriaMetrics/metricsql v0.21.0 h1:wA/IVfRFQaThy4bM1kAmPiCR0BkWv4tEXD9lBF+GPdU= github.com/VictoriaMetrics/metricsql v0.21.0/go.mod h1:ylO7YITho/Iw6P71oEaGyHbO94bGoGtzWfLGqFhMIg8= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= @@ -921,15 +921,17 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= github.com/valyala/fastjson v1.6.3 h1:tAKFnnwmeMGPbwJ7IwxcTPCNr3uIzoIj3/Fh90ra4xc= github.com/valyala/fastjson v1.6.3/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= -github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2ObdkI= github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= +github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G8= +github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/gozstd v1.12.0 h1:CVG/hZKv3VqgiesiDrFrkgTIwDr5+9yaRaFDgMso5lI= github.com/valyala/gozstd v1.12.0/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ= -github.com/valyala/histogram v1.1.2 h1:vOk5VrGjMBIoPR5k6wA8vBaC8toeJ8XO0yfRjFEc1h8= github.com/valyala/histogram v1.1.2/go.mod h1:CZAr6gK9dbD7hYx2s8WSPh0p5x5wETjC+2b3PJVtEdg= +github.com/valyala/histogram v1.2.0 h1:wyYGAZZt3CpwUiIb9AU/Zbllg1llXyrtApRS815OLoQ= +github.com/valyala/histogram v1.2.0/go.mod h1:Hb4kBwb4UxsaNbbbh+RRz8ZR6pdodR57tzWUS3BUzXY= github.com/valyala/quicktemplate v1.6.3 h1:O7EuMwuH7Q94U2CXD6sOX8AYHqQqWtmIk690IhmpkKA= github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= diff --git a/vendor/github.com/VictoriaMetrics/metrics/go.mod b/vendor/github.com/VictoriaMetrics/metrics/go.mod index a66c19bd3..1202ec8d5 100644 --- a/vendor/github.com/VictoriaMetrics/metrics/go.mod +++ b/vendor/github.com/VictoriaMetrics/metrics/go.mod @@ -1,5 +1,5 @@ module github.com/VictoriaMetrics/metrics -require github.com/valyala/histogram v1.1.2 +require github.com/valyala/histogram v1.2.0 go 1.12 diff --git a/vendor/github.com/VictoriaMetrics/metrics/go.sum b/vendor/github.com/VictoriaMetrics/metrics/go.sum index b1219448d..b94ade699 100644 --- a/vendor/github.com/VictoriaMetrics/metrics/go.sum +++ b/vendor/github.com/VictoriaMetrics/metrics/go.sum @@ -1,4 +1,4 @@ -github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2ObdkI= -github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= -github.com/valyala/histogram v1.1.2 h1:vOk5VrGjMBIoPR5k6wA8vBaC8toeJ8XO0yfRjFEc1h8= -github.com/valyala/histogram v1.1.2/go.mod h1:CZAr6gK9dbD7hYx2s8WSPh0p5x5wETjC+2b3PJVtEdg= +github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G8= +github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= +github.com/valyala/histogram v1.2.0 h1:wyYGAZZt3CpwUiIb9AU/Zbllg1llXyrtApRS815OLoQ= +github.com/valyala/histogram v1.2.0/go.mod h1:Hb4kBwb4UxsaNbbbh+RRz8ZR6pdodR57tzWUS3BUzXY= diff --git a/vendor/github.com/valyala/fastrand/fastrand.go b/vendor/github.com/valyala/fastrand/fastrand.go index 3ea9177cc..8d25b5602 100644 --- a/vendor/github.com/valyala/fastrand/fastrand.go +++ b/vendor/github.com/valyala/fastrand/fastrand.go @@ -68,6 +68,11 @@ func (r *RNG) Uint32n(maxN uint32) uint32 { return uint32((uint64(x) * uint64(maxN)) >> 32) } +// Seed sets the r state to n. +func (r *RNG) Seed(n uint32) { + r.x = n +} + func getRandomUint32() uint32 { x := time.Now().UnixNano() return uint32((x >> 32) ^ x) diff --git a/vendor/github.com/valyala/histogram/go.mod b/vendor/github.com/valyala/histogram/go.mod index 984efbe63..cc65b0067 100644 --- a/vendor/github.com/valyala/histogram/go.mod +++ b/vendor/github.com/valyala/histogram/go.mod @@ -2,4 +2,4 @@ module github.com/valyala/histogram go 1.12 -require github.com/valyala/fastrand v1.0.0 +require github.com/valyala/fastrand v1.1.0 diff --git a/vendor/github.com/valyala/histogram/go.sum b/vendor/github.com/valyala/histogram/go.sum index 2b3e848a5..c5ca58805 100644 --- a/vendor/github.com/valyala/histogram/go.sum +++ b/vendor/github.com/valyala/histogram/go.sum @@ -1,2 +1,2 @@ -github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2ObdkI= -github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= +github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G8= +github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ= diff --git a/vendor/github.com/valyala/histogram/histogram.go b/vendor/github.com/valyala/histogram/histogram.go index e90dd7033..71be2afc5 100644 --- a/vendor/github.com/valyala/histogram/histogram.go +++ b/vendor/github.com/valyala/histogram/histogram.go @@ -49,6 +49,10 @@ func (f *Fast) Reset() { f.a = nil f.tmp = nil } + // Reset rng state in order to get repeatable results + // for the same sequence of values passed to Fast.Update. + // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1612 + f.rng.Seed(1) } // Update updates the f with v. diff --git a/vendor/modules.txt b/vendor/modules.txt index 3b7f82987..4969eff0c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -19,7 +19,7 @@ github.com/VictoriaMetrics/fastcache github.com/VictoriaMetrics/fasthttp github.com/VictoriaMetrics/fasthttp/fasthttputil github.com/VictoriaMetrics/fasthttp/stackless -# github.com/VictoriaMetrics/metrics v1.17.3 +# github.com/VictoriaMetrics/metrics v1.18.0 ## explicit github.com/VictoriaMetrics/metrics # github.com/VictoriaMetrics/metricsql v0.21.0 @@ -203,7 +203,7 @@ github.com/valyala/bytebufferpool ## explicit github.com/valyala/fastjson github.com/valyala/fastjson/fastfloat -# github.com/valyala/fastrand v1.0.0 +# github.com/valyala/fastrand v1.1.0 ## explicit github.com/valyala/fastrand # github.com/valyala/fasttemplate v1.2.1 @@ -212,7 +212,7 @@ github.com/valyala/fasttemplate # github.com/valyala/gozstd v1.12.0 ## explicit github.com/valyala/gozstd -# github.com/valyala/histogram v1.1.2 +# github.com/valyala/histogram v1.2.0 ## explicit github.com/valyala/histogram # github.com/valyala/quicktemplate v1.6.3