Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Fixed type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
scottjab committed Nov 3, 2016
1 parent 0042eda commit 3a0ab9b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions partitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,11 @@ func (p *partitions) updateRemotePartitions(nodes []string) {
}

// Keep track of old peers in case zookeeper goes away.
if len(p.old >= 1024) {
if len(p.old) >= 1024 {
p.old = p.old[:1024]
}
p.old = append(remote, p.old)
oldRemote := []map[int][]string{remote}
p.old = append(oldRemote, p.old...)

p.remote = remote
p.updateMissing()
Expand Down Expand Up @@ -242,7 +243,8 @@ func (p *partitions) getPeers(partition int) []string {

// Append old peers to peer list, in case of Zookeeper issues.
for _, oldPeer := range p.old {
peers = append(peers, oldPeer[partition])

peers = append(peers, oldPeer[partition]...)
}
return peers
}
Expand Down

0 comments on commit 3a0ab9b

Please sign in to comment.