{"record":{"id":"b15dcad9d5cc606a","repo":"vitessio/vitess","slug":"invalid-float64-value-for-v-v","errorCode":null,"errorMessage":"invalid float64 value for %v: %v","messagePattern":"invalid float64 value for (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"go/vt/vttablet/tabletserver/debugenv.go","lineNumber":139,"sourceCode":"\t\tf(ival)\n\t\tmsg = fmt.Sprintf(\"Setting %v to: %v\", varname, value)\n\t\treturn nil\n\t}\n\n\tsetDurationVal := func(f func(time.Duration)) error {\n\t\tdurationVal, err := time.ParseDuration(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid duration value for %v: %v\", varname, err)\n\t\t}\n\t\tf(durationVal)\n\t\tmsg = fmt.Sprintf(\"Setting %v to: %v\", varname, value)\n\t\treturn nil\n\t}\n\n\tsetFloat64Val := func(f func(float64)) error {\n\t\tfval, err := strconv.ParseFloat(value, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid float64 value for %v: %v\", varname, err)\n\t\t}\n\t\tf(fval)\n\t\tmsg = fmt.Sprintf(\"Setting %v to: %v\", varname, value)\n\t\treturn nil\n\t}\n\n\tvar err error\n\tswitch varname {\n\tcase \"ReadPoolSize\":\n\t\terr = setIntValCtx(tsv.SetPoolSize)\n\tcase \"StreamPoolSize\":\n\t\terr = setIntValCtx(tsv.SetStreamPoolSize)\n\tcase \"TransactionPoolSize\":\n\t\terr = setIntValCtx(tsv.SetTxPoolSize)\n\tcase \"MaxResultSize\":\n\t\terr = setIntVal(tsv.SetMaxResultSize)\n\tcase \"WarnResultSize\":\n\t\terr = setIntVal(tsv.SetWarnResultSize)","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vttablet/tabletserver/debugenv.go#L121-L157","documentation":"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.","triggerScenarios":"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.","commonSituations":"Locale-formatted decimal commas instead of dots; percentages or suffixed values ('50%'); scientific notation out of float64 range.","solutions":["Send a valid float64 literal using a dot as the decimal separator (e.g. '0.75')","Remove units/suffixes and send the bare numeric value","Check the embedded strconv.ParseFloat error for range/format specifics"],"exampleFix":"// before\nvalue=1,5\n// after\nvalue=1.5","handlingStrategy":"validation","validationCode":"if _, err := strconv.ParseFloat(value, 64); err != nil { return fmt.Errorf(\"invalid float64 for %s: %w\", varname, err) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use dot as decimal separator (1.5, not 1,5)","No % or unit suffixes; send the bare numeric value","Check float64 range (no 1e400) before sending"],"tags":["parsing","float64","debug-env","tabletserver"],"backgroundTag":"invalid-float-parsing","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}