spacejam / paxos

simple CASPaxos implementation written in rust on top of a simulator for finding bugs quickly
139 stars 3 forks source link

how does this handle an overflow of the ballot number #1

Closed fogti closed 3 years ago

fogti commented 3 years ago

(I wasn't able to find any documentation at all about how any implementation handles this...) I would like to know how this system would behave if it was "spammed" with updates and thus the Ballot number would reach usize::MAX. I didn't find an explicit mention of it in the original CASPaxos paper, and would like to know how this could be handled. Even suggestions how it may be handled would be good enough, probably...

ghost commented 3 years ago

Ballot number is of type u64. If the ballot number is bumped ("spammed") every nanosecond (which is unrealistic since modern computer and networks are not that fast), it would take 585 years to overflow. Fortunately or unfortunately, we won't be alive by then.