vitessio/vitess · error
unknown tableID %v in DeleteRows event
Error message
unknown tableID %v in DeleteRows event
What it means
Returned by the binlog streamer when a DeleteRows event references a tableID that is not present in the streamer's table map, typically because the corresponding TableMap event was filtered out or skipped.
Source
Thrown at go/vt/binlog/binlog_streamer.go:581
})
rows, err := ev.Rows(format, tce.tm)
if err != nil {
return pos, err
}
statements = bls.appendUpdates(statements, tce, &rows)
if autocommit {
if err = commit(ev.Timestamp()); err != nil {
return pos, err
}
}
case ev.IsDeleteRows():
tableID := ev.TableID(format)
tce, ok := tableMaps[tableID]
if !ok {
return pos, fmt.Errorf("unknown tableID %v in DeleteRows event", tableID)
}
if tce.ti == nil {
// Skip cross-db statements.
continue
}
setTimestamp := &binlogdatapb.BinlogTransaction_Statement{
Category: binlogdatapb.BinlogTransaction_Statement_BL_SET,
Sql: fmt.Appendf(nil, "SET TIMESTAMP=%d", ev.Timestamp()),
}
statements = append(statements, FullBinlogStatement{
Statement: setTimestamp,
})
rows, err := ev.Rows(format, tce.tm)
if err != nil {
return pos, err
}
View on GitHub (pinned to 01a25a7d17)
Solutions
- Restart the stream from a GTID/position at a transaction boundary
- Verify the binlog integrity with mysqlbinlog and re-copy if damaged
- Keep TABLE_MAP events unfiltered in the stream pipeline
- Confirm the binlog producer emits table maps before delete-rows events
Defensive patterns
Strategy: validation
Validate before calling
// confirm pairing before streaming: // mysqlbinlog --start-position=<pos> <file> | grep -E 'Table_map|Delete_rows'
Try / catch
err := streamer.Stream(ctx, signals)
if err != nil && strings.Contains(err.Error(), "unknown tableID") {
// restart stream from a clean transaction boundary
} Prevention
- Resume streams at transaction boundaries only
- Preserve TABLE_MAP events in any filtering layer
- Run mysqlbinlog checks before resuming after crashes
- Fix custom binlog emitters to include table maps
When it happens
Trigger: ev.IsDeleteRows() produces a tableID missing from tableMaps in parseEvents due to a lost/skipped table map event or a corrupt/misaligned binlog stream.
Common situations: Stream resumption mid-transaction, binlog truncation/corruption, synthetic binlog generators missing table maps, or aggressive database filtering dropping map events.
Related errors
- unknown tableID %v in WriteRows event
- unknown tableID %v in UpdateRows event
- unknown table %v in schema
- [%v] cached columns count[%d] mismatch binglog row [%d]
- GetPreviousGTIDs: previous GTIDs not found
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/8be76677897f5a34.
Report an issue: GitHub.