vitessio/vitess · warning
value must be either a float64 (interpreted as seconds) or a
Error message
value must be either a float64 (interpreted as seconds) or a valid time.Duration
What it means
Cluster.GetSrvVSchema acquires topoReadPool before reading the per-cell SrvVSchema from vtctld. If the pool acquisition fails (context cancelled or timed out waiting for a slot), the call returns this wrapped error instead of querying.
Source
Thrown at go/flagutil/float_to_duration.go:55
}
// Set parses the input and updates the duration
func (f *FloatOrDuration) Set(value string) error {
// Try to parse as float64 first (interpreted as seconds)
if floatVal, err := strconv.ParseFloat(value, 64); err == nil {
f.Duration = time.Duration(floatVal * float64(time.Second))
*f.Target = f.Duration // Update the target pointer
return nil
}
// Try to parse as time.Duration
if duration, err := time.ParseDuration(value); err == nil {
f.Duration = duration
*f.Target = f.Duration // Update the target pointer
return nil
}
return errors.New("value must be either a float64 (interpreted as seconds) or a valid time.Duration")
}
// Type returns the type description
func (f *FloatOrDuration) Type() string {
return "time.Duration"
}
// FloatDuration defines a flag with the specified name, default value, and usage string and binds it to a time.Duration variable.
func FloatDuration(fs *pflag.FlagSet, p *time.Duration, name string, defaultValue time.Duration, usage string) {
*p = defaultValue
fd := FloatOrDuration{
Target: p,
Duration: defaultValue,
}
fs.Var(&fd, name, usage)
}
View on GitHub (pinned to 01a25a7d17)
Solutions
- Retry the request
- Raise the topo read pool size or lower concurrency of callers
- Investigate topo server latency that keeps pool slots occupied
Defensive patterns
Strategy: retry
Try / catch
sv, err := cluster.GetSrvVSchema(ctx, cell)
if err != nil && errors.Is(err, context.DeadlineExceeded) {
// pool contention; retry with backoff or larger deadline
sv, err = cluster.GetSrvVSchema(ctx2, cell)
} Prevention
- Avoid bursting many concurrent per-cell topo reads
- Increase topoReadPool capacity in busy deployments
- Watch topo backend latency
When it happens
Trigger: Calling Cluster.GetSrvVSchema for a cell while topoReadPool is saturated and ctx expires during Acquire.
Common situations: Many concurrent vschema/topo reads; slow etcd/zookeeper causing long pool waits; aggressive client timeouts.
Related errors
- flagutil: NewOptionalFlag requires a non-nil parse function
- flagutil: OptionalFlagValue has no parse function; use a con
- invalid choice for enum
- GetVSchema(keyspace = %s): %w
- %w: keyspace %s
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/c0f788fa4c3b6378.
Report an issue: GitHub.