-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mcrouter: support nested key_fractions from runtime_vars config
Summary: as part of [Mcrouter Runtime Variables Safety project](https://docs.google.com/document/d/1sC7CDHKn7NuemYxtr4x8WCXvr1DHa1bbO-JllwsRNhI/edit?tab=t.0), a new schema for runtime_vars is defined: ``` struct RuntimeVars { 1: list<DynamicSampler> dynamic_samplers; 2: map<string, map<string, PrefixOverride>> prefix_overrides; // mcrouter key fractions: tier name -> fraction of keyspace to sample 3: map<string, float> key_fractions; } ``` existing `key_fraction_range_` are listed at the root-level of `/configerator-gz/mcrouter/web/runtime_vars.json`, which are not compatible with thrift config {F1974385271} To allow thrift compatible schema, key are moved under `key_fractions` This diff adds support for consuming KVRs from key_fractions vs from root level of runtime_vars.json example: ``` { "dynamic_samplers": [], "prefix_overrides": {}, "key_fractions": { "ucache.shadow.ucache_gateway_proxy_ftw": 0.01234, }, "key_fraction_range_ucache.shadow.ucache_gateway_proxy_ftw": [0, 0.01234] } ``` Reviewed By: disylh Differential Revision: D68250145 fbshipit-source-id: 222ab9012a2591a0973911f9897419f706fd26b7
- Loading branch information
1 parent
5cedcd9
commit 2c429dc
Showing
2 changed files
with
93 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters