apache / kvrocks-controller

Apache Kvrocks Controller is a cluster management tool for Apache Kvrocks.
https://kvrocks.apache.org/
Apache License 2.0
78 stars 42 forks source link

Add `sync.Group` to wait for the election goroutines to exit for etcd storage #132

Closed jihuayu closed 7 months ago

jihuayu commented 7 months ago

In this PR, I added sync.Group to the etcd storage to wait for the goroutines (observeLeaderEvent and electLoop) for the election to exit.

In addition, I fixed the bug in test case.