Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_decided_suffix unnecessary LogEntry wrapper #102

Open
kevin-harrison opened this issue Jun 15, 2023 · 1 comment
Open

read_decided_suffix unnecessary LogEntry wrapper #102

kevin-harrison opened this issue Jun 15, 2023 · 1 comment

Comments

@kevin-harrison
Copy link
Contributor

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.

@kevin-harrison
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant