Closed Connor1996 closed 1 year ago
Test would be fixed later if the change is acceptable.
This is a breaking change and if users have adjusted the priority, this can lead to expected behavior during rolling update.
This is a breaking change and if users have adjusted the priority, this can lead to expected behavior during rolling update.
Yes, but we can't find a way to not break that. And seems priority isn't widely used and the interface is breaking which user should be aware of that and handle it in upper level.
Do you have any better idea? If the priority field in kvproto is i64, everything would work fine, but it's also breaking
You can change the priority in Config
to i64 and add a new priority field defined as s64 to pb definition. If new field is not set, then use the old field; otherwise use the new field. When broadcasting request vote, both fields are set if the priority is larger than 0.
This change is not a fully compatible change, but it makes minimal impact that only new priority is not recognized by the old nodes.
Signed-off-by: Connor1996 zbk602423539@gmail.com
u64 based priority is not handy, when you want to lower or raise the priority of one peer, you have to adjust all the peers'.