vitessio/vitess · warning

invalid float64 value for %v: %v

Error message

invalid float64 value for %v: %v

What it means

Debug-env variable handler error for float64-typed variables. The provided value must parse with strconv.ParseFloat(value, 64); otherwise the handler returns the variable name and the underlying parse error.

Source

Thrown at go/vt/vttablet/tabletserver/debugenv.go:139

		f(ival)
		msg = fmt.Sprintf("Setting %v to: %v", varname, value)
		return nil
	}

	setDurationVal := func(f func(time.Duration)) error {
		durationVal, err := time.ParseDuration(value)
		if err != nil {
			return fmt.Errorf("invalid duration value for %v: %v", varname, err)
		}
		f(durationVal)
		msg = fmt.Sprintf("Setting %v to: %v", varname, value)
		return nil
	}

	setFloat64Val := func(f func(float64)) error {
		fval, err := strconv.ParseFloat(value, 64)
		if err != nil {
			return fmt.Errorf("invalid float64 value for %v: %v", varname, err)
		}
		f(fval)
		msg = fmt.Sprintf("Setting %v to: %v", varname, value)
		return nil
	}

	var err error
	switch varname {
	case "ReadPoolSize":
		err = setIntValCtx(tsv.SetPoolSize)
	case "StreamPoolSize":
		err = setIntValCtx(tsv.SetStreamPoolSize)
	case "TransactionPoolSize":
		err = setIntValCtx(tsv.SetTxPoolSize)
	case "MaxResultSize":
		err = setIntVal(tsv.SetMaxResultSize)
	case "WarnResultSize":
		err = setIntVal(tsv.SetWarnResultSize)

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Send a valid float64 literal using a dot as the decimal separator (e.g. '0.75')
  2. Remove units/suffixes and send the bare numeric value
  3. Check the embedded strconv.ParseFloat error for range/format specifics

Example fix

// before
value=1,5
// after
value=1.5
Defensive patterns

Strategy: validation

Validate before calling

if _, err := strconv.ParseFloat(value, 64); err != nil { return fmt.Errorf("invalid float64 for %s: %w", varname, err) }

Prevention

When it happens

Trigger: Setting a float-typed debug env var (via setFloat64Val) with a non-numeric or out-of-range value such as 'abc', '1,5' (comma decimal separator), '1e400' (overflow), or an empty string.

Common situations: Locale-formatted decimal commas instead of dots; percentages or suffixed values ('50%'); scientific notation out of float64 range.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/b15dcad9d5cc606a. Report an issue: GitHub.