Merge pull request #2313 from xiang90/cluster_mu
etcdserver: move the mutex before what it guardsrelease-2.0
commit
73e67628d9
|
@ -58,12 +58,13 @@ type ClusterInfo interface {
|
|||
type Cluster struct {
|
||||
id types.ID
|
||||
token string
|
||||
store store.Store
|
||||
|
||||
sync.Mutex // guards members and removed map
|
||||
members map[types.ID]*Member
|
||||
// removed contains the ids of removed members in the cluster.
|
||||
// removed id cannot be reused.
|
||||
removed map[types.ID]bool
|
||||
store store.Store
|
||||
sync.Mutex
|
||||
}
|
||||
|
||||
// NewClusterFromString returns a Cluster instantiated from the given cluster token
|
||||
|
|
Loading…
Reference in New Issue