Open angxiang opened 11 months ago
All modified lines are covered by tests :white_check_mark:
Comparison is base (
92bd0c2
) 96.73% compared to head (87cccbc
) 96.65%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Once sequence node is incremented beyond 2147483647, the sequence overflows into the negative space. When getting predecessors, cast the node sequence from String to int before comparing.
Closes #730
Why is this needed?
Prevents perpetual re-election if sequence nodes is incremented beyond 2147483647. Previously the sequence node comparison was comparing two Strings, with this change the comparison is done with integers instead. This means that the only re-election due to an integer overflow will happen when incrementing from 2147483647 to -2147483648, but any subsequent increment will not result in a re-election.
Proposed Changes
Does this PR introduce any breaking change?
No