lock
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 30s
Build and Publish / BuildAndDeploy (push) Successful in 2m41s

This commit is contained in:
matst80
2024-11-22 08:39:01 +01:00
parent 9b137e2ff1
commit 006d3ab4d8

View File

@@ -335,8 +335,8 @@ func (p *SyncedPool) Negotiate() {
} }
func (p *SyncedPool) GetHealthyRemotes() []*RemoteHost { func (p *SyncedPool) GetHealthyRemotes() []*RemoteHost {
// p.mu.RLock() p.mu.RLock()
// defer p.mu.RUnlock() defer p.mu.RUnlock()
remotes := make([]*RemoteHost, 0, len(p.remotes)) remotes := make([]*RemoteHost, 0, len(p.remotes))
for _, r := range p.remotes { for _, r := range p.remotes {
if r.IsHealthy() { if r.IsHealthy() {
@@ -351,10 +351,7 @@ func (p *SyncedPool) RequestOwnership(id CartId) error {
all := 0 all := 0
for _, r := range p.GetHealthyRemotes() { 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) err := r.ConfirmChange(id, p.Hostname)
all++ all++
if err != nil { if err != nil {