etcd
etcd copied to clipboard
Why is the check within func Mutex.Lock() needed after Txn committing?
trafficstars
https://github.com/etcd-io/etcd/blob/be2929568f81080b20ef6812992f2e09c8dac91b/client/v3/concurrency/mutex.go#L78
After Txn is commited, getOwner should return exactly one KV and len(ownerKey)should equals to 1. Because if cmp is true, we will put one into it within the same txn.
So, in which case we will have len(ownerKey) equals to 0?
The relevant PR is https://github.com/etcd-io/etcd/pull/8107
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.