Project

General

Profile

Actions

Bug #14398

closed

[keep-balance] deadlock on index retrieval error

Added by Tom Clegg over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Keep
Target version:
Story points:
-
Release:
Release relationship:
Auto

Description

The error handling in keep-balance's GetCurrentState func depends on the size of the "errs" channel exceeding the number of possible errors from various goroutines. It used to be correct when the number of goroutines was 2+nServers, but then the number of goroutines changed to 2+nMounts, and GetCurrentState deadlocks if more than 2+nMounts > 2+nServers and all mounts return errors (e.g., wrong auth token).

Rather than relying on the channel size, fix this by using channel size 1 and ignoring subsequent errors once the channel is full (they won't be reported anyway).

Actions

Also available in: Atom PDF