mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: fix append object to a new allocated sized slice
This commit is contained in:
parent
fa972cf296
commit
cdc28507ef
@ -313,7 +313,7 @@ func (s *EtcdServer) getPeerHashKVs(rev int64) (resps []*peerHashKVResp) {
|
||||
// TODO: handle the case when "s.cluster.Members" have not
|
||||
// been populated (e.g. no snapshot to load from disk)
|
||||
mbs := s.cluster.Members()
|
||||
pss := make([]peerHashKVResp, len(mbs))
|
||||
pss := make([]peerHashKVResp, 0, len(mbs))
|
||||
for _, m := range mbs {
|
||||
if m.ID == s.ID() {
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user