{"record":{"id":"e7ecd77befa48d36","repo":"VictoriaMetrics/VictoriaMetrics","slug":"error-when-processing-imported-data-w","errorCode":null,"errorMessage":"error when processing imported data: %w","messagePattern":"error when processing imported data: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/protoparser/csvimport/stream/streamparser.go","lineNumber":167,"sourceCode":"\treqBuf   []byte\n\tfirstRow bool\n}\n\nfunc (uw *unmarshalWork) reset() {\n\tuw.rows.Reset()\n\tuw.ctx = nil\n\tuw.callback = nil\n\tuw.cds = nil\n\tuw.reqBuf = uw.reqBuf[:0]\n\tuw.firstRow = false\n}\n\nfunc (uw *unmarshalWork) runCallback(rows []csvimport.Row) {\n\tctx := uw.ctx\n\tif err := uw.callback(rows); err != nil {\n\t\tctx.callbackErrLock.Lock()\n\t\tif ctx.callbackErr == nil {\n\t\t\tctx.callbackErr = fmt.Errorf(\"error when processing imported data: %w\", err)\n\t\t}\n\t\tctx.callbackErrLock.Unlock()\n\t}\n\tctx.wg.Done()\n}\n\n// Unmarshal implements protoparserutil.UnmarshalWork\nfunc (uw *unmarshalWork) Unmarshal() {\n\tif uw.firstRow {\n\t\tuw.rows.UnmarshalDetectHeader(bytesutil.ToUnsafeString(uw.reqBuf), uw.cds)\n\t} else {\n\t\tuw.rows.Unmarshal(bytesutil.ToUnsafeString(uw.reqBuf), uw.cds)\n\t}\n\trows := uw.rows.Rows\n\trowsRead.Add(len(rows))\n\n\t// Set missing timestamps\n\tcurrentTs := time.Now().UnixNano() / 1e6","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/VictoriaMetrics/VictoriaMetrics/blob/5079fb58f1e8e62113f90c945ad71586c797d770/lib/protoparser/csvimport/stream/streamparser.go#L149-L185","documentation":"Stored in streamContext.callbackErr (under callbackErrLock) when the rows-processing callback returned an error during a csv import; only the first callback error is kept and it aborts the whole Parse.","triggerScenarios":"Thrown at lib/protoparser/csvimport/stream/streamparser.go:167 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped callback error — usually a storage-level rejection (bad labels, timestamps) of the parsed rows","Fix the offending rows or ingestion limits and resend"],"exampleFix":null,"handlingStrategy":"try-catch","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"}