From bdac00f674008ba85c2f857b2dc8e9e2aa876284 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Mon, 25 Nov 2024 11:49:34 +0100 Subject: [PATCH] app/vmselect: fixes multitenant cache init Previously multitenant cache was inited before flag.Parse call. It didn't allow to change cache expiration value and default value was always used. This commit adds cache init at the first time cache was called. Also this commit adds small cache improvements: * chore for cleanup cache, it now uses common pattern for in-place items filtering * fail cache request fast if item is already expired --------- Signed-off-by: f41gh7 Co-authored-by: Roman Khavronenko --- docs/changelog/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 2a06f7e42..926f680a7 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -30,6 +30,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): improve the correctness of alert [state restoration](https://docs.victoriametrics.com/vmalert/#alerts-state-on-restarts). Previously, it could result in false-positive alerts if alert was resolved shortly before vmalert restart. * BUGFIX: [vmalert-tool](https://docs.victoriametrics.com/vmalert-tool/): exit immediately with error message if no test file is found under specified `-files`. * BUGFIX: `vmselect` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): Properly handle [multitenant](https://docs.victoriametrics.com/cluster-victoriametrics/#multitenancy-via-labels) query request errors and correctly perform search for available tenants. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7549) for details. This is follow-up after [v1.106.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.106.1) release changes. +* BUGFIX: `vmselect` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): properly set `multitenant` cache expiration duration with `search.tenantCacheExpireDuration`. Previously flag always used default value. ## [v1.106.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.106.1)