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 context cancellation racy handling #744

Merged
merged 1 commit into from Nov 18, 2019
Merged

Commits on Sep 6, 2019

  1. Fix context cancellation racy handling

    [why]
    Context cancellation goroutine is not in sync with Next() method lifetime.
    It leads to sql.ErrNoRows instead of context.Canceled often (easy to reproduce).
    It leads to interruption of next query executed on same connection (harder to reproduce).
    
    [how]
    Do query in goroutine, wait when interruption done.
    
    [testing]
    Add unit test that reproduces error cases.
    azavorotnii committed Sep 6, 2019
    Copy the full SHA
    7e1a61d View commit details
    Browse the repository at this point in the history