You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code looks wrong given the way it's called in various places.
// GetInstancesMaxLag returns the maximum lag in a set of instances
func GetInstancesMaxLag(instances [](*Instance)) (maxLag int64, err error) {
if len(instances) == 0 {
return 0, log.Errorf("No instances found in GetInstancesMaxLag")
}
...
}
It looks to me as if len(instances) may be 0 in some cases. I've seen this error and think that probably in this case you should just return 0, nil as otherwise you need to special case various routines that call this to check first.
The text was updated successfully, but these errors were encountered:
This code looks wrong given the way it's called in various places.
It looks to me as if len(instances) may be 0 in some cases. I've seen this error and think that probably in this case you should just return 0, nil as otherwise you need to special case various routines that call this to check first.
The text was updated successfully, but these errors were encountered: