mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-18 14:40:26 +01:00
efb7213f6b
### Describe Your Changes If a dict flag has only one value without a prefix it is supposed to replace default value. Previously, when flag was set to `-flag=2` and the default value in `NewDictInt` was set to 1 the resulting value for any `flag.Get()` call would be 1 which is not expected. This commit updates default value for the flag in case there is only one entry for flag and the entry is a number without a key. This affects cluster version and specifically `replicationFactor` flag usage with vmstorage [node groups](https://docs.victoriametrics.com/cluster-victoriametrics/#vmstorage-groups-at-vmselect). Previously, the following configuration would effectively be ignored: ``` /path/to/vmselect \ -replicationFactor=2 \ -storageNode=g1/host1,g1/host2,g1/host3 \ -storageNode=g2/host4,g2/host5,g2/host6 \ -storageNode=g3/host7,g3/host8,g3/host9 ``` Changes from this PR will force default value for `replicationFactor` flag to be set to `2` which is expected as the result of this configuration. --------- Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com> |
||
---|---|---|
.. | ||
testdata | ||
array_test.go | ||
array.go | ||
bytes_test.go | ||
bytes.go | ||
dict_test.go | ||
dict.go | ||
duration_test.go | ||
duration.go | ||
flag.go | ||
password_test.go | ||
password.go | ||
secret.go | ||
usage.go |