test/net-pool #2
@@ -335,8 +335,8 @@ func (p *SyncedPool) Negotiate() {
|
||||
}
|
||||
|
||||
func (p *SyncedPool) GetHealthyRemotes() []*RemoteHost {
|
||||
// p.mu.RLock()
|
||||
// defer p.mu.RUnlock()
|
||||
p.mu.RLock()
|
||||
defer p.mu.RUnlock()
|
||||
remotes := make([]*RemoteHost, 0, len(p.remotes))
|
||||
for _, r := range p.remotes {
|
||||
if r.IsHealthy() {
|
||||
@@ -351,10 +351,7 @@ func (p *SyncedPool) RequestOwnership(id CartId) error {
|
||||
all := 0
|
||||
|
||||
for _, r := range p.GetHealthyRemotes() {
|
||||
if !r.IsHealthy() {
|
||||
continue
|
||||
}
|
||||
//log.Printf("Asking for confirmation change of %s to %s (me) with %s\n", id, p.Hostname, r.Host)
|
||||
|
||||
err := r.ConfirmChange(id, p.Hostname)
|
||||
all++
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user