Commit b77103c
committed
fix dynamic_config: don't store defaults to cache
Changelog entry (fixes):
* Dynamic config variables, for which the @ref dynamic_config_defaults "default value" is currently used, are no longer stored into the cache file. This fixes an interaction where the service would ignore a changed default value for a config variable.
---
Let's look at a setup where the config service only sends configs which were explicitly overridden compared to the defaults.
If
1. defaults change (e.g. by modifying `dynamic_config_fallback.json`),
2. the service restarts, and
3. there is an old config cache file
then the cache will contain all configs, including the configs that the config service did not send, for which the defaults were used.
The behavior will be as if the old defaults were somehow stuck, which is erroneous.
commit_hash:68b4c2aa0ebca6d663cf636b7b4249b64f764cda1 parent 63d05a9 commit b77103c
3 files changed
Lines changed: 24 additions & 3 deletions
File tree
- core
- functional_tests/dynamic_configs/tests
- src/dynamic_config/storage
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
8 | 17 | | |
9 | 18 | | |
10 | 19 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
2 | 11 | | |
3 | 12 | | |
4 | 13 | | |
| |||
15 | 24 | | |
16 | 25 | | |
17 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
224 | 225 | | |
225 | 226 | | |
226 | | - | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| |||
0 commit comments