influxdata/influxdb · warning · FormatError

failed to serialize record id

Error message

failed to serialize record id {record_id} to value: {reason}

What it means

A record decoded from the catalog log could not be serialized into a value for inspection ({reason}). This happens in inspection/diagnostic tooling that converts records into a generic value (e.g. JSON-like) so callers can view them; the record itself was decodable, but producing its value representation failed.

Solutions

  1. Read the embedded reason to identify which record conversion failed and use a matching tool version.
  2. Upgrade or downgrade the inspection tooling to match the catalog's writer version.
  3. If only one record is affected, inspect other records and report the failing record id/version to maintainers.
Defensive patterns

Strategy: try-catch

Validate before calling

// Skip/flag records that fail inspection instead of aborting the whole dump
match record.to_value() {
    Ok(v) => emit(v),
    Err(e) => eprintln!("skipping record {}: {e}", record.id()),
}

Try / catch

match record.to_value() {
    Ok(v) => /* inspect v */,
    Err(e) => log::warn!("record {} not serializable: {}", record.id(), e),
}

Prevention

When it happens

Trigger: Running catalog inspection/debug commands over a log containing a record type whose serialization to a value fails (unsupported/unimplemented conversion, version-skewed record shape).

Common situations: Using `influxdb3 show`-style inspection tooling against catalogs written by newer/older versions; custom tooling calling the record-to-value API on exotic record types.

Understand the failure class

Background: json.Marshal / "failed to marshal" errors in Go: why "unsupported type" happens and how to fix it — this error's family across 22 libraries.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/71bf7ac8c7441553. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_catalog/src/format/mod.rs:241

    RestoreRequiresStore,

    /// Loading the backup snapshot/log files referenced by a `RestoreCatalog`
    /// record failed.
    #[error("failed to load restore source: {0}")]
    RestoreLoadFailed(String),

    /// The checkpoint or log path in a `RestoreCatalog` record could not be
    /// parsed as an object-store path.
    #[error("invalid restore path: {0}")]
    InvalidRestorePath(String),

    /// The backup snapshot referenced by a `RestoreCatalog` record was not
    /// found at the recorded checkpoint path.
    #[error("restore checkpoint not found at {checkpoint_path}")]
    RestoreCheckpointMissing { checkpoint_path: String },

    /// A decoded record could not be serialized to a value for inspection.
    #[error("failed to serialize record id {record_id} to value: {reason}")]
    RecordToValue { record_id: u16, reason: String },
}

#[cfg(test)]
mod tests;

View on GitHub (pinned to 06200ef96b)