mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

election runner can deadlock in atomic release(). suppose election runner has two clients A and B. if A is a leader and B is a follower, B obtains lock for release() and waits for A to close(nextc) which signal next round is ready. However, A can only close(nextc) if it obtains lock for release(); hence deadlock. this pr removes atomicity of validate() and release() in global.go and gives the responsibility of locking to each runner. FIXES #7891