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: automated cherry pick of #10153 to release-3.2 #10162

Conversation

jingyih
Copy link
Contributor

@jingyih jingyih commented Oct 8, 2018

Cherry pick of #10153 on release-3.2.

#10153: 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
@jingyih jingyih changed the title Automated cherry pick of #10153 Automated cherry pick of #10153 to release-3.2 Oct 8, 2018
@jingyih jingyih changed the title Automated cherry pick of #10153 to release-3.2 clientv3: automated cherry pick of #10153 to release-3.2 Oct 9, 2018
@jingyih jingyih merged commit afa5bed into etcd-io:release-3.2 Oct 9, 2018
@jingyih jingyih deleted the automated-cherry-pick-of-#10153-origin-release-3.2 branch September 7, 2019 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants