mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
docs: follow-up for 70eaa06f08
Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
70eaa06f08
commit
bc79f7196d
2 changed files with 27 additions and 1 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"reflect"
|
||||
"strconv"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/storage"
|
||||
)
|
||||
|
@ -254,3 +255,28 @@ func tagFiltersToString(tfs []storage.TagFilter) string {
|
|||
b = append(b, '}')
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func TestGetDeadline(t *testing.T) {
|
||||
f := func(got, exp Deadline) {
|
||||
if got.Deadline() != exp.Deadline() {
|
||||
t.Fatalf("expected to have %v; got %v instead", exp, got)
|
||||
}
|
||||
}
|
||||
|
||||
start := time.Now()
|
||||
expDeadline := func(deadline time.Duration) Deadline {
|
||||
return NewDeadline(start, deadline, "")
|
||||
}
|
||||
|
||||
r, _ := http.NewRequest("GET", "", nil)
|
||||
f(GetDeadlineForExport(r, start), expDeadline(*maxExportDuration))
|
||||
f(GetDeadlineForLabelsAPI(r, start), expDeadline(*maxLabelsAPIDuration))
|
||||
f(GetDeadlineForStatusRequest(r, start), expDeadline(*maxStatusRequestDuration))
|
||||
f(GetDeadlineForQuery(r, start), expDeadline(*maxQueryDuration))
|
||||
|
||||
r, _ = http.NewRequest("GET", "http://foo?timeout=1s", nil)
|
||||
f(GetDeadlineForExport(r, start), expDeadline(time.Second))
|
||||
f(GetDeadlineForLabelsAPI(r, start), expDeadline(time.Second))
|
||||
f(GetDeadlineForStatusRequest(r, start), expDeadline(time.Second))
|
||||
f(GetDeadlineForQuery(r, start), expDeadline(time.Second))
|
||||
}
|
||||
|
|
|
@ -62,8 +62,8 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/).
|
|||
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly set `Host` header in requests to scrape targets when [`server_name` option at `tls_config`](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#tls_config) is set. Previously the `Host` header was set incorrectly to the target hostname in this case.
|
||||
* BUGFIX: do not drop `match[]` filter at [`/api/v1/series`](https://docs.victoriametrics.com/url-examples/#apiv1series) if `-search.ignoreExtraFiltersAtLabelsAPI` command-line flag is set, since missing `match[]` filter breaks `/api/v1/series` requests.
|
||||
* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl.html): properly parse TLS key and CA files for [InfluxDB](https://docs.victoriametrics.com/vmctl/#migrating-data-from-influxdb-1x) and [OpenTSDB](https://docs.victoriametrics.com/vmctl/#migrating-data-from-opentsdb) migration modes.
|
||||
|
||||
* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix VictoriaLogs UI query handling to correctly apply `_time` filter across all queries. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5920).
|
||||
* BUGFIX: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmselect` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): limit duration of requests to /api/v1/labels, /api/v1/label/.../values or /api/v1/series with `-search.maxLabelsAPIDuration` duration. Before, `-search.maxExportDuration` value was used by mistake. Thanks to @kbweave for the [pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5992).
|
||||
|
||||
## [v1.99.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.99.0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue