mirror of
https://github.com/bytedance/g3.git
synced 2026-05-05 15:31:21 +00:00
update weight f64 -> u32 convert rule
This commit is contained in:
parent
fb64352293
commit
f7d0f9133b
3 changed files with 19 additions and 1 deletions
|
|
@ -63,6 +63,10 @@ The map consists 2 fields:
|
|||
|
||||
The weight of the name.
|
||||
|
||||
This value will be converted to u32 when working with ketama consistent hash, the convert rule is:
|
||||
- value between (0.0..1.0) will be converted to 1
|
||||
- value larger than 1.0 will be rounded to the nearest integer value
|
||||
|
||||
**default**: 1.0
|
||||
|
||||
If the value type is string, then it's value will be the *name* field, with *weight* set to default value.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue