Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #10111
- Loading branch information