This PR fixes the implementation of etcd election API. Currently, there is only one key for each election. But actually each candidate will create a key and the leader is the one with the smallest revision.
Please note that this implementation is still not exactly as the official etcd, where election API is implemented on top of KV and lease API on the client side.
This PR fixes the implementation of etcd election API. Currently, there is only one key for each election. But actually each candidate will create a key and the leader is the one with the smallest revision.
Please note that this implementation is still not exactly as the official etcd, where election API is implemented on top of KV and lease API on the client side.