{"record":{"id":"198cdf269296e52c","repo":"VictoriaMetrics/VictoriaMetrics","slug":"incorrect-influx-line-q-w","errorCode":null,"errorMessage":"incorrect influx line %q: %w","messagePattern":"incorrect influx line %q: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/protoparser/influx/parser.go","lineNumber":234,"sourceCode":"\tv, err := parseFieldValue(s[n+1:], uc)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot parse field value for %q: %w\", f.Key, err)\n\t}\n\tf.Value = v\n\treturn nil\n}\n\nfunc (rs *Rows) unmarshal(s string, skipInvalidLines bool) error {\n\trs.uc.hasEscapeChars = strings.IndexByte(s, '\\\\') >= 0\n\tfor len(s) > 0 {\n\t\tn := strings.IndexByte(s, '\\n')\n\t\tif n < 0 {\n\t\t\t// The last line.\n\t\t\tn = len(s)\n\t\t}\n\t\tif err := rs.unmarshalRow(s[:n]); err != nil {\n\t\t\tif !skipInvalidLines {\n\t\t\t\treturn fmt.Errorf(\"incorrect influx line %q: %w\", s, err)\n\t\t\t}\n\t\t\tlogger.Errorf(\"skipping InfluxDB line %q because of error: %s\", s, err)\n\t\t\tinvalidLines.Inc()\n\t\t}\n\t\tif len(s) == n {\n\t\t\treturn nil\n\t\t}\n\t\ts = s[n+1:]\n\t}\n\treturn nil\n}\n\nfunc (rs *Rows) unmarshalRow(s string) error {\n\tif len(s) > 0 && s[len(s)-1] == '\\r' {\n\t\ts = s[:len(s)-1]\n\t}\n\tif len(s) == 0 {\n\t\t// Skip empty line","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/VictoriaMetrics/VictoriaMetrics/blob/5079fb58f1e8e62113f90c945ad71586c797d770/lib/protoparser/influx/parser.go#L216-L252","documentation":"Top-level guard in Rows.unmarshal: one of the lines in the batch failed to parse and skipInvalidLines is false (non-streaming mode), so the entire request is rejected. The full multi-line input is echoed alongside the wrapped per-line cause.","triggerScenarios":"Thrown at lib/protoparser/influx/parser.go:234 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped error to find the first offending line and fix it at the sender","Use the streaming ingest mode, which skips invalid lines instead of rejecting the request","Validate batches client-side before sending to avoid whole-batch rejection"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5079fb58f1e8e62113f90c945ad71586c797d770","analyzedAt":"2026-09-03T18:10:26.153Z","contentChangedAt":"2026-09-03T18:10:26.153Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}