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

Non-leaders passivate entities eventually #200

Merged
merged 6 commits into from
Apr 12, 2023

Conversation

xirc
Copy link
Contributor

@xirc xirc commented Apr 7, 2023

Closes #199

Solution

A non-leader (follower or candidate) asks permission to passivate an entity to the leader. The leader replies with a permit or denial based on whether the leader's entity is running. If the non-leader receives a permit, it will passivate its entity. This mechanism ensures that non-leaders can passivate their entity eventually after the leader passivate the leader's entity.

There is a subtle timing at which the leader could permit passivation mistakenly (for example, the leader's entity is terminated with an unexpected failure). To address this leader's mistake, when the leader restarts its entity, the leader makes a request to non-leaders such that non-leaders entities start.

Considerations

Taichi Yamakawa added 4 commits April 7, 2023 18:07
A non-leader (follower or candidate) asks permission to passivate an
entity to the leader. The leader replies with a permit or denial based
on whether the leader's entity is running. If the non-leader receives a
permit, it will passivate its entity. This mechanism ensures that
non-leaders can passivate their entity eventually after the leader
passivate the leader's entity.
The leader could permit passivation mistakenly if the entity has been
terminated with a failure. The leader will recover from the mistake by
requesting non-leaders such that non-leaders entities start.
@xirc xirc marked this pull request as ready for review April 10, 2023 01:44
@xirc xirc requested a review from negokaz April 10, 2023 01:44
Copy link
Contributor

@negokaz negokaz left a comment

Choose a reason for hiding this comment

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

Great! I've left some (trivial) comments.

Copy link
Contributor

@negokaz negokaz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@negokaz negokaz enabled auto-merge April 12, 2023 06:58
@negokaz negokaz merged commit 9a21949 into master Apr 12, 2023
@negokaz negokaz deleted the non-leaders-passivate-entities-eventually branch April 12, 2023 07:30
@xirc xirc added this to the v2.3.0 milestone May 9, 2023
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.

Dead letters about ReplicationRegion$Passivate continue
2 participants