influxdata/influxdb · error · PersisterError
unexpected persister error
Error message
unexpected persister error: {0:?} What it means
PersisterError::Unexpected wraps an anyhow::Error for any unexpected error inside the Persister that is not covered by a specific variant. It renders the error with Debug formatting (`{0:?}`) to include the full error chain and context.
Solutions
- Read the full Debug chain in the message; the anyhow context strings reveal which operation failed.
- Reproduce with the same input/data and file an issue if it looks like an influxdb3 bug.
- Check for partial writes left by earlier failures in the object store and clean them up.
- Upgrade influxdb3 — many 'unexpected' cases become typed errors or get fixed over time.
Defensive patterns
Strategy: try-catch
Type guard
fn is_unexpected(e: &PersisterError) -> bool {
matches!(e, PersisterError::Unexpected(_))
} Try / catch
match persister.persist(...).await {
Err(e) => {
// Debug format carries the full anyhow chain
log::error!("persister failed: {:?}", e);
if let PersisterError::Unexpected(inner) = &e {
log::error!("root cause: {:?}", inner);
}
}
Ok(v) => v,
} Prevention
- Log the full Debug output — the anyhow context chain points to the failing operation.
- Clean up partially-written objects after any persistence failure.
- Keep influxdb3 updated; unexpected variants often become typed errors.
When it happens
Trigger: Any `.context(...)?`-propagated anyhow error inside persister code paths — logic bugs, invariant violations, or operations lacking a dedicated PersisterError variant.
Common situations: Hitting an unhandled edge case during persistence (e.g. inconsistent metadata, unexpected object-store state); bugs in influxdb3 itself; mixed internal state after a partial failure.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/b7d50807016c99ea.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_write/src/persister.rs:68
#[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")]
InvalidSnapshotSequenceNumber,
}
View on GitHub (pinned to 06200ef96b)