Skip to content

Optimize resend of prepare and promise #132

@haraldng

Description

@haraldng

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovements that enhances performance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions