VictoriaMetrics/VictoriaMetrics · error
error when processing imported data: %w
Error message
error when processing imported data: %w
What it means
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.
Source
Thrown at lib/protoparser/csvimport/stream/streamparser.go:167
reqBuf []byte
firstRow bool
}
func (uw *unmarshalWork) reset() {
uw.rows.Reset()
uw.ctx = nil
uw.callback = nil
uw.cds = nil
uw.reqBuf = uw.reqBuf[:0]
uw.firstRow = false
}
func (uw *unmarshalWork) runCallback(rows []csvimport.Row) {
ctx := uw.ctx
if err := uw.callback(rows); err != nil {
ctx.callbackErrLock.Lock()
if ctx.callbackErr == nil {
ctx.callbackErr = fmt.Errorf("error when processing imported data: %w", err)
}
ctx.callbackErrLock.Unlock()
}
ctx.wg.Done()
}
// Unmarshal implements protoparserutil.UnmarshalWork
func (uw *unmarshalWork) Unmarshal() {
if uw.firstRow {
uw.rows.UnmarshalDetectHeader(bytesutil.ToUnsafeString(uw.reqBuf), uw.cds)
} else {
uw.rows.Unmarshal(bytesutil.ToUnsafeString(uw.reqBuf), uw.cds)
}
rows := uw.rows.Rows
rowsRead.Add(len(rows))
// Set missing timestamps
currentTs := time.Now().UnixNano() / 1e6View on GitHub (pinned to 5079fb58f1)
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at lib/protoparser/csvimport/stream/streamparser.go:167 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of VictoriaMetrics/VictoriaMetrics@5079fb58f1 (2026-09-03).
Data as JSON: /api/errors/e7ecd77befa48d36.
Report an issue: GitHub.