influxdata/influxdb · error · ParquetFileProtoError

no partition id specified for parquet file

Error message

no partition id specified for parquet file

What it means

ParquetFileProtoError::NoPartitionId is raised when deserializing a protobuf-serialized ParquetFile that lacks a partition ID field entirely. Every ParquetFile must be associated with a partition, so the library treats its absence as a hard deserialization failure.

Solutions

  1. Ensure the partition id is set on the ParquetFile proto before serializing/storing
  2. Repair existing records by backfilling the correct partition id
  3. Re-generate the ParquetFile record so it references a valid partition

Example fix

// before
ParquetFileProto { partition_id: None, .. }
// after
ParquetFileProto { partition_id: Some(partition_id), .. }
Defensive patterns

Strategy: validation

Validate before calling

fn parquet_file_proto_ok(pf: &ParquetFileProto) -> bool {
    pf.partition_id.is_some()
}

Try / catch

let pf = ParquetFile::try_from(proto).map_err(|e| match e {
    ParquetFileProtoError::NoPartitionId => anyhow!("parquet file {} missing partition id", proto.id),
    other => anyhow!(other),
})?;

Prevention

When it happens

Trigger: Deserializing a ParquetFile proto message where the partition id field was never set (None/0 default absent), typically when reading catalog records written incompletely or by buggy writers.

Common situations: Partial catalog writes that skipped the partition id; older record formats predating the partition-id field; manual proto construction in tests/tools omitting the field.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at core/data_types/src/lib.rs:1305

            file_size_bytes: v.file_size_bytes,
            row_count: v.row_count,
            compaction_level: v
                .compaction_level
                .try_into()
                .map_err(|_| ProtoV1ParquetFileError::CompactionLevel)?,
            created_at: Timestamp::new(v.created_at),
            column_set: ColumnSet::new(v.column_set.into_iter().map(ColumnId::new)),
            max_l0_created_at: Timestamp::new(v.max_l0_created_at),
            source: ParquetFileSource::from_proto(v.source),
        })
    }
}

/// Errors deserialising a protobuf serialised [`ParquetFile`].
#[derive(Debug, Error)]
pub enum ParquetFileProtoError {
    /// The proto type does not contain a partition ID.
    #[error("no partition id specified for parquet file")]
    NoPartitionId,

    /// The specified object store UUID is invalid.
    #[error("invalid object store ID: {0}")]
    InvalidObjectStoreId(uuid::Error),

    /// The specified compaction level value is invalid.
    #[error(transparent)]
    InvalidCompactionLevel(#[from] CompactionLevelProtoError),
}

/// Value for a `parquet_file` record's `max_l0_created_at` field. If `MaxL0CreatedAt::Computed`,
/// the value came from the computation of the maximum of the `created_at` attributes of the source
/// files compacted into this file. If `MaxL0CreatedAt::SameAsCreatedAt`, this file was not created
/// from other files (that is, it was created via ingest) and its `max_l0_created_at` field should
/// be set to the same value for `created_at` that the catalog will assign.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum MaxL0CreatedAt {

View on GitHub (pinned to 06200ef96b)