influxdata/influxdb · error · PersisterError

parquet error

Error message

parquet error: {0}

What it means

PersisterError::ParquetError wraps a parquet::errors::ParquetError from writing or reading Parquet data. Any failure in the arrow-parquet writer/reader used by the Persister (encoding, schema conversion, file I/O) is converted via `#[from]`.

Solutions

  1. Inspect the inner ParquetError message for the failing operation (write vs read).
  2. Verify the RecordBatch schema uses parquet-supported types and matches the table schema.
  3. Delete or repair corrupt/truncated parquet files in the object store.
  4. Align arrow and parquet crate versions in the dependency tree (cargo tree -i arrow).
Defensive patterns

Strategy: validation

Validate before calling

// ensure the batch is non-empty and uses encodable types
if batch.num_columns() == 0 { return Err("no columns"); }
arrow::util::bench:: '' // replace with: verify schema types are parquet-encodable via parquet::arrow::ArrowWriterOptions

Type guard

fn is_parquet_error(e: &PersisterError) -> bool {
    matches!(e, PersisterError::ParquetError(_))
}

Try / catch

match persister.persist(batch).await {
    Err(PersisterError::ParquetError(e)) => eprintln!("parquet encode/decode failed: {e}"),
    Err(e) => return Err(e.into()),
    Ok(v) => v,
}

Prevention

When it happens

Trigger: Persisting RecordBatches to parquet when the arrow writer fails (unsupported types, schema issues, underlying writer IO error), or reading parquet metadata/files back from the object store.

Common situations: RecordBatches containing types the parquet writer cannot encode; truncated/corrupt parquet files in object storage; arrow/parquet crate version mismatch; disk full while writing.

Understand the failure class

Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.

Related errors


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

Appendix: source

Thrown at influxdb3_write/src/persister.rs:59

use parking_lot::RwLock;
use parquet::arrow::ArrowWriter;
use parquet::basic::Compression;
use parquet::file::metadata::ParquetMetaData;
use parquet::file::properties::WriterProperties;
use tokio::sync::Semaphore;

#[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}")]

View on GitHub (pinned to 06200ef96b)