influxdata/influxdb · error · PersisterError

parse int error

Error message

parse int error: {0}

What it means

PersisterError::ParseInt wraps a std::num::ParseIntError from parsing integer components out of persisted file names or metadata strings (e.g. the sequence number or timestamp segments of parquet paths). Via `#[from]`, any failing `str::parse::<u64>()` inside the persister becomes this variant.

Solutions

  1. Check the inner ParseIntError message and the string being parsed (usually embedded in the surrounding context).
  2. Rename or remove the offending file so it matches the canonical naming scheme.
  3. Ensure all writers use the same influxdb3 version producing the same file layout.
  4. Avoid writing additional files into the influxdb3 object-store prefix by external tooling.

Example fix

// before: parsing an arbitrary path segment
let seq: u64 = parts.last().unwrap().parse()?;
// after: validate shape before parsing
let seq: u64 = parts
    .last()
    .ok_or_else(|| anyhow!("missing sequence segment"))?
    .parse()?;
Defensive patterns

Strategy: validation

Validate before calling

let seq: u64 = seq_str.parse().map_err(|e| format!("bad sequence '{seq_str}': {e}"))?;

Type guard

fn parse_u64(s: &str) -> Option<u64> { s.parse::<u64>().ok() }

Try / catch

match result {
    Err(PersisterError::ParseInt(e)) => eprintln!("non-numeric path segment: {e}"),
    Err(e) => return Err(e.into()),
    Ok(v) => v,
}

Prevention

When it happens

Trigger: Persister parses numeric fields from object-store paths or manifest strings (e.g. splitting a parquet filename to extract the sequence number) and the segment is not a valid integer.

Common situations: Non-numeric or empty path segments from malformed file names in the bucket; files written by older influxdb3 versions with different naming; manual file manipulation in object storage.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


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

Appendix: source

Thrown at influxdb3_write/src/persister.rs:65

#[derive(Debug, thiserror::Error)]
pub enum PersisterError {
    #[error("datafusion error: {0}")]
    DataFusion(#[from] DataFusionError),

    #[error("serde_json error: {0}")]
    SerdeJson(#[from] serde_json::Error),

    #[error("object_store error: {0}")]
    ObjectStore(#[from] object_store::Error),

    #[error("parquet error: {0}")]
    ParquetError(#[from] parquet::errors::ParquetError),

    #[error("tried to serialize a parquet file with no rows")]
    NoRows,

    #[error("parse int error: {0}")]
    ParseInt(#[from] std::num::ParseIntError),

    #[error("unexpected persister error: {0:?}")]
    Unexpected(#[from] anyhow::Error),

    #[error("table snapshot persistence task panicked: {0}")]
    TableSnapshotPersistenceTaskFailed(#[source] tokio::task::JoinError),

    #[error("snapshot manifest parse task panicked: {0}")]
    SnapshotParseTaskFailed(#[source] tokio::task::JoinError),

    #[error("table index error: {0}")]
    TableIndexPathError(#[source] crate::paths::PathError),

    #[error("object meta is missing filename")]
    MissingFilename,

    #[error("failed to parse snapshot sequence number from filename")]

View on GitHub (pinned to 06200ef96b)