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
f7d0f9133b
commit
a252c5b88d
3 changed files with 4 additions and 19 deletions
|
|
@ -62,10 +62,7 @@ The map consists 2 fields:
|
|||
**optional**, **type**: f64
|
||||
|
||||
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
|
||||
It may be converted to the smallest u32 greater than or equal to the f64 value when used.
|
||||
|
||||
**default**: 1.0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue