From f97203c4b4b3284a4d181fc1283126c679723c72 Mon Sep 17 00:00:00 2001 From: Artem Fetishev Date: Tue, 28 Apr 2026 11:13:10 +0200 Subject: [PATCH] temporarily rename duplicated flags to make apptests pass Signed-off-by: Artem Fetishev --- app/vmstorage/servers/vmselect.go | 14 +++++++------- apptest/testcase.go | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/vmstorage/servers/vmselect.go b/app/vmstorage/servers/vmselect.go index 80eeb89d36..8401c8845a 100644 --- a/app/vmstorage/servers/vmselect.go +++ b/app/vmstorage/servers/vmselect.go @@ -20,22 +20,22 @@ import ( ) var ( - maxUniqueTimeseries = flag.Int("search.maxUniqueTimeseries", 0, "The maximum number of unique time series, which can be scanned during every query. "+ + maxUniqueTimeseries = flag.Int("search.maxUniqueTimeseries1", 0, "The maximum number of unique time series, which can be scanned during every query. "+ "This allows protecting against heavy queries, which select unexpectedly high number of series. When set to zero, the limit is automatically calculated based on -search.maxConcurrentRequests (inversely proportional) and memory available to the process (proportional). See also -search.max* command-line flags at vmselect") - maxTagKeys = flag.Int("search.maxTagKeys", 100e3, "The maximum number of tag keys returned per search. "+ + maxTagKeys = flag.Int("search.maxTagKeys1", 100e3, "The maximum number of tag keys returned per search. "+ "See also -search.maxLabelsAPISeries and -search.maxLabelsAPIDuration") - maxTagValues = flag.Int("search.maxTagValues", 100e3, "The maximum number of tag values returned per search. "+ + maxTagValues = flag.Int("search.maxTagValues1", 100e3, "The maximum number of tag values returned per search. "+ "See also -search.maxLabelsAPISeries and -search.maxLabelsAPIDuration") - maxTagValueSuffixesPerSearch = flag.Int("search.maxTagValueSuffixesPerSearch", 100e3, "The maximum number of tag value suffixes returned from /metrics/find") - maxConcurrentRequests = flag.Int("search.maxConcurrentRequests", 2*cgroup.AvailableCPUs(), "The maximum number of concurrent vmselect requests "+ + maxTagValueSuffixesPerSearch = flag.Int("search.maxTagValueSuffixesPerSearch1", 100e3, "The maximum number of tag value suffixes returned from /metrics/find") + maxConcurrentRequests = flag.Int("search.maxConcurrentRequests1", 2*cgroup.AvailableCPUs(), "The maximum number of concurrent vmselect requests "+ "the vmstorage can process at -vmselectAddr. It shouldn't be high, since a single request usually saturates a CPU core, and many concurrently executed requests "+ "may require high amounts of memory. See also -search.maxQueueDuration") - maxQueueDuration = flag.Duration("search.maxQueueDuration", 10*time.Second, "The maximum time the incoming vmselect request waits for execution "+ + maxQueueDuration = flag.Duration("search.maxQueueDuration1", 10*time.Second, "The maximum time the incoming vmselect request waits for execution "+ "when -search.maxConcurrentRequests limit is reached") disableRPCCompression = flag.Bool("rpc.disableCompression", false, "Whether to disable compression of the data sent from vmstorage to vmselect. "+ "This reduces CPU usage at the cost of higher network bandwidth usage") - denyQueriesOutsideRetention = flag.Bool("denyQueriesOutsideRetention", false, "Whether to deny queries outside of the configured -retentionPeriod. "+ + denyQueriesOutsideRetention = flag.Bool("denyQueriesOutsideRetention1", false, "Whether to deny queries outside of the configured -retentionPeriod. "+ "When set, then /api/v1/query_range would return '503 Service Unavailable' error for queries with 'from' value outside -retentionPeriod. "+ "This may be useful when multiple data sources with distinct retentions are hidden behind query-tee") ) diff --git a/apptest/testcase.go b/apptest/testcase.go index 7732e93835..463e07748d 100644 --- a/apptest/testcase.go +++ b/apptest/testcase.go @@ -92,6 +92,9 @@ func (tc *TestCase) MustStartDefaultVmsingle() *Vmsingle { // fails to start. func (tc *TestCase) MustStartVmsingle(instance string, flags []string) *Vmsingle { tc.t.Helper() + // TODO(rtm0): Move to defaultFlags in vmsingle.go. Currently does not work + // because legacy vmsingle does not have this flag. + flags = append(flags, "-vmselectAddr=127.0.0.1:0") return tc.MustStartVmsingleAt(instance, "../../bin/victoria-metrics-race", flags) }