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

Flush batched entries timer #128

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

kevin-harrison
Copy link
Contributor

Please make sure these boxes are checked, before submitting a new PR.

  • You ran the local CI checker with ./check.sh with no errors
  • You reference which issue is being closed in the PR text (if applicable)
  • You updated the OmniPaxos book (if applicable)

Issues

Fix #127. Omnipaxos::tick() now also flushes batched log entries every flush_batch_tick_timeout ticks. This stops entries from being stuck in the batch buffer when there are no incoming proposals.

Breaking Changes

  • Adds new field flush_batch_tick_timeout to ServerConfig.

Copy link
Owner

@haraldng haraldng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I just want to confirm with you that we don't need to check that we're in the accept phase to flush these entries? Because they get buffered up in memory only in the accept phase.

@kevin-harrison
Copy link
Contributor Author

Looks good to me. I just want to confirm with you that we don't need to check that we're in the accept phase to flush these entries? Because they get buffered up in memory only in the accept phase.

Yes exactly the entries will get flushed on entering the Prepare phase and will only start batching up in the Accept phase. But to be safe its probably better to only flush in the accept phase to prevent future bugs. I'll make that change now.

Copy link
Owner

@haraldng haraldng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@haraldng haraldng merged commit ed1d50c into haraldng:master Dec 1, 2023
6 checks passed
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

Successfully merging this pull request may close these issues.

Flush entries timer
2 participants