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

stopper: Ensure that Closers and Ctxs are always cleaned up #27920

Merged
merged 2 commits into from
Jul 25, 2018

Commits on Jul 25, 2018

  1. stopper: synchronize access to sCancels functions

    Fixes cockroachdb#27908.
    
    Release note: None
    nvanbenschoten committed Jul 25, 2018
    Configuration menu
    Copy the full SHA
    2018e93 View commit details
    Browse the repository at this point in the history
  2. stopper: Ensure that Closers and Ctxs are always cleaned up

    Before this change the Stopper made no guarantee that `Closers`
    registered by the `AddCloser` method or `Contexts` tied to
    the `Stopper` with `WithCancelOn{Quiesce,Stop}` were ever properly
    cleaned up. In cases where these methods were called concurrently
    with the Stopper stopping, it was possible for the resources to
    leak. This change fixes this by handling cases where these methods
    are called concurrently with or after the Stopper has stopped. This
    allows them to provide stronger external guarantees.
    
    Release note: None
    nvanbenschoten committed Jul 25, 2018
    Configuration menu
    Copy the full SHA
    297a916 View commit details
    Browse the repository at this point in the history