omnipaxos
omnipaxos copied to clipboard
read_decided_suffix unnecessary LogEntry wrapper
Right now when a user calls Omnipaxos::read_decided_suffix()
they receive a LogEntry
struct which wraps an entry in order to show if the entry is decided or not. Seeing as it will always be decided this is unnecessary. We can simply return an Entry
instead.
On second thought this isn't possible, because read_decided_suffix()
needs to return more than just an Entry
type since it can return StopSign
and Compacted
types. Therefore, we need a enum such as LogEntry
to wrap the possible return types. It is still awkward here for users to have to pattern match on LogEntry::Undecided(Entry)
. We could return a DecidedLogEntry
enum which removes this awkwardness at the cost of most more complexity.