influxdata/influxdb · error · TableIndexCacheError
Failed to serialize initial table index conversion marker
Error message
Failed to serialize initial table index conversion marker
What it means
TableIndexCacheError::SerializeConversionMarkerError, thrown when serde_json fails to serialize the initial TableIndexConversionCompleted marker before it is written to the object store. Because the marker is a small, static struct, this almost always indicates a serde attribute/compatibility problem rather than bad input data.
Solutions
- Check the inner serde_json::Error message to identify the exact field/type that failed
- Pin or update serde/serde_json (and time-related crates like chrono) to compatible versions used by the InfluxDB 3 build
- Verify Cargo feature flags (serde derives, arbitrary_precision, etc.) weren't disabled in a custom build
- Report upstream if it occurs on an unmodified release build — the marker struct should always be serializable
Defensive patterns
Strategy: try-catch
Validate before calling
// sanity-check the marker before serializing
fn marker_is_valid(m: &TableIndexConversionCompleted) -> bool {
serde_json::to_value(m).is_ok()
} Try / catch
match err {
TableIndexCacheError::SerializeConversionMarkerError(e) => {
error!(source=%e, "marker serialization failed — check serde/serde_json versions and feature flags");
// abort init: marker must persist before conversion is deemed complete
return Err(e.into());
}
other => other?,
} Prevention
- Keep serde, serde_json, and chrono/time crates on the versions locked by the workspace
- Don't disable serde-related cargo features in custom builds
- Add a unit test serializing the marker struct in CI
- Treat serialization failures of static structs as release-blocking bugs
When it happens
Trigger: First startup after enabling table indexes (or after conversion) when no marker exists: the cache builds a new conversion-completed marker (timestamp, snapshot info) and calls serde_json::to_vec / to_string; a serde_json::Error propagates as this variant.
Common situations: A non-string-map key or unsupported type in the marker struct after a code change; incompatible serde feature flags (e.g. missing chrono/serde_json feature) breaking timestamp serialization; downstream crate version mismatch altering field types.
Understand the failure class
Background: "JSON serialization failed", "not JSON serializable", "Failed to serialize": why JSON marshaling errors happen and how to fix them — this error's family across 46 libraries.
Related errors
- ' ' is a reserved column
- auto field family exists
- cache error
- can only accept once
- cannot fit duration into u64
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/b6f00965040d3a4a.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_write/src/table_index_cache.rs:84
#[error("Failed to parse table index path from object store path")]
TableIndexPath(#[source] crate::paths::PathError),
#[error("Failed to list table index snapshots from object store")]
ListSnapshots(#[source] object_store::Error),
#[error("Failed to parse table index snapshot path from object store path")]
TableIndexSnapshotPath(#[source] crate::paths::PathError),
#[error("Failed to update table index: join task failed")]
UpdateTaskFailed(#[source] tokio::task::JoinError),
#[error("Failed to list object store metadata")]
ListMetasError(#[source] object_store::Error),
#[error("Failed to load table index conversion marker bytes from object store")]
LoadConversionMarkerBytesError(#[source] object_store::Error),
#[error("Failed to serialize initial table index conversion marker")]
SerializeConversionMarkerError(#[source] serde_json::Error),
#[error("Failed to put initial table index conversion marker to object store")]
PutConversionMarkerError(#[source] object_store::Error),
#[error("Failed to parse snapshot info file path")]
ParseSnapshotPathError(#[source] anyhow::Error),
#[error("Failed to split persisted snapshot into table snapshots")]
SplitPersistedSnapshotError(#[source] crate::table_index::TableIndexError),
#[error("Failed to load table index from object store")]
LoadTableIndexFromObjectStoreError(#[source] crate::table_index::TableIndexError),
#[error("Failed to update table index from object store")]
UpdateTableIndexFromObjectStoreError(#[source] crate::table_index::TableIndexError),
#[error("Failed to create table index from object store")]View on GitHub (pinned to 06200ef96b)