VictoriaMetrics/docs/changelog
Zakhar Bessarab efb7213f6b
lib/flagutil/dict: properly update default value in case there is no key value set (#7211)
### 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>
2024-10-17 11:11:45 -03:00
..
_index.md docs: move changelog to dir (#6853) 2024-08-22 16:59:17 +02:00
CHANGELOG_2020.md docs: fix broken links to prev changelogs 2024-09-03 10:49:20 +02:00
CHANGELOG_2021.md docs: fix broken links to prev changelogs 2024-09-03 10:49:20 +02:00
CHANGELOG_2022.md docs: fixes misspelled typos 2024-09-13 13:19:03 +02:00
CHANGELOG_2023.md docs: fixes misspelled typos 2024-09-13 13:19:03 +02:00
CHANGELOG.md lib/flagutil/dict: properly update default value in case there is no key value set (#7211) 2024-10-17 11:11:45 -03:00