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

clientv3/concurrency.Mutex.Lock() - preserve invariant #10153

Merged
merged 1 commit into from
Oct 8, 2018

Commits on Oct 5, 2018

  1. clientv3: concurrency.Mutex.Lock() - preserve invariant

    Convenient invariant:
    - if werr == nil then lock is supposed to be locked at the moment.
    
    While we could not be confident in stronger invariant ('is exactly locked'),
    it were inconvenient that previous code could return `werr == nil` after
    Mutex.Unlock.
    
    It could happen when ctx is canceled/timeouted exactly after waitDeletes
    successfully returned werr == nil and before `<-ctx.Done()` checked.
    While such situation is very rare, it is still possible.
    
    fixes etcd-io#10111
    funny-falcon committed Oct 5, 2018
    Configuration menu
    Copy the full SHA
    64e8b2e View commit details
    Browse the repository at this point in the history