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

[WIP] Add CAS for shutdown #4929

Closed
wants to merge 1 commit into from
Closed

[WIP] Add CAS for shutdown #4929

wants to merge 1 commit into from

Conversation

jefferai
Copy link
Member

This is to try to prevent a deadlock if a leadership loss occurs at the same time as a seal operation. I think the logic is right but it's not yet tested.

@jefferai jefferai added this to the 0.10.4 milestone Jul 15, 2018
jefferai added a commit that referenced this pull request Jul 16, 2018
This turns c.sealed into an atomic, which allows us to call sealInternal
without a lock. By doing so we can better control lock grabbing when a
condition causing the standby loop to get out of active happens. This
encapsulates that logic into two distinct pieces (although they could
be combined into one), and makes lock guarding more understandable.
briankassouf pushed a commit that referenced this pull request Jul 24, 2018
* Tackle #4929 a different way

This turns c.sealed into an atomic, which allows us to call sealInternal
without a lock. By doing so we can better control lock grabbing when a
condition causing the standby loop to get out of active happens. This
encapsulates that logic into two distinct pieces (although they could
be combined into one), and makes lock guarding more understandable.

* Re-add context canceling to the non-HA version of sealInternal

* Return explicitly after stopCh triggered
@jefferai jefferai deleted the shutdowncas branch July 24, 2018 20:57
@jefferai
Copy link
Member Author

Superceded by #4932

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.

2 participants