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

Fix two issues during client restore state #2376

Merged
merged 1 commit into from
Feb 28, 2017
Merged

Conversation

dadgar
Copy link
Contributor

@dadgar dadgar commented Feb 28, 2017

This PR fixes two issues:

  1. A close of a nil stopCollection channel when restoring and prestart
    fails. The failure will cause the killCh to be triggered which will
    close collection before it has been initialized.

  2. Fixes a deadlock in which the handleWaitCh is never triggered since
    it is not initialized when there is an error in prestart and the killCh
    is triggered.

Both fixes are by maintaining the loop invariant that the two channels
are valid after there is a handle.

This PR fixes two issues:

1) A close of a nil stopCollection channel when restoring and prestart
fails. The failure will cause the killCh to be triggered which will
close collection before it has been initialized.

2) Fixes a deadlock in which the handleWaitCh is never triggered since
it is not initialized when there is an error in prestart and the killCh
is triggered.

Both fixes are by maintaining the loop invariant that the two channels
are valid after there is a handle.
Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

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

LGTM

@dadgar dadgar merged commit 243c084 into master Feb 28, 2017
@dadgar dadgar deleted the b-fix-restore-errors branch February 28, 2017 18:40
@github-actions
Copy link

github-actions bot commented Apr 5, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants