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

Optimize resend of prepare and promise #132

Open
haraldng opened this issue Jan 29, 2024 · 0 comments
Open

Optimize resend of prepare and promise #132

haraldng opened this issue Jan 29, 2024 · 0 comments
Labels
enhancement Improvements that enhances performance

Comments

@haraldng
Copy link
Owner

Currently, a follower caches the promise message so that we can resend it upon timeout in case it gets dropped. However, the promise might contain log suffix or snapshot so it is wasteful to keep it in memory.

Since we can always recalculate the log suffix and/or snapshot that we should send to the leader in the promise, it is better to just cache the Prepare message.

Another optimization is to in the Prepare message include a flag that indicates whether the leader is interested in the suffix at all. In that case followers don't have to include the unnecessary suffix if we're already in the accept phase.

@haraldng haraldng added the enhancement Improvements that enhances performance label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements that enhances performance
Projects
None yet
Development

No branches or pull requests

1 participant