{"record":{"id":"b6f00965040d3a4a","repo":"influxdata/influxdb","slug":"failed-to-serialize-initial-table-index-conversion-marker","errorCode":null,"errorMessage":"Failed to serialize initial table index conversion marker","messagePattern":"Failed to serialize initial table index conversion marker","errorType":"exception","errorClass":"TableIndexCacheError","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/table_index_cache.rs","lineNumber":84,"sourceCode":"    #[error(\"Failed to parse table index path from object store path\")]\n    TableIndexPath(#[source] crate::paths::PathError),\n\n    #[error(\"Failed to list table index snapshots from object store\")]\n    ListSnapshots(#[source] object_store::Error),\n\n    #[error(\"Failed to parse table index snapshot path from object store path\")]\n    TableIndexSnapshotPath(#[source] crate::paths::PathError),\n\n    #[error(\"Failed to update table index: join task failed\")]\n    UpdateTaskFailed(#[source] tokio::task::JoinError),\n\n    #[error(\"Failed to list object store metadata\")]\n    ListMetasError(#[source] object_store::Error),\n\n    #[error(\"Failed to load table index conversion marker bytes from object store\")]\n    LoadConversionMarkerBytesError(#[source] object_store::Error),\n\n    #[error(\"Failed to serialize initial table index conversion marker\")]\n    SerializeConversionMarkerError(#[source] serde_json::Error),\n\n    #[error(\"Failed to put initial table index conversion marker to object store\")]\n    PutConversionMarkerError(#[source] object_store::Error),\n\n    #[error(\"Failed to parse snapshot info file path\")]\n    ParseSnapshotPathError(#[source] anyhow::Error),\n\n    #[error(\"Failed to split persisted snapshot into table snapshots\")]\n    SplitPersistedSnapshotError(#[source] crate::table_index::TableIndexError),\n\n    #[error(\"Failed to load table index from object store\")]\n    LoadTableIndexFromObjectStoreError(#[source] crate::table_index::TableIndexError),\n\n    #[error(\"Failed to update table index from object store\")]\n    UpdateTableIndexFromObjectStoreError(#[source] crate::table_index::TableIndexError),\n\n    #[error(\"Failed to create table index from object store\")]","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/table_index_cache.rs#L66-L102","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// sanity-check the marker before serializing\nfn marker_is_valid(m: &TableIndexConversionCompleted) -> bool {\n    serde_json::to_value(m).is_ok()\n}","typeGuard":null,"tryCatchPattern":"match err {\n    TableIndexCacheError::SerializeConversionMarkerError(e) => {\n        error!(source=%e, \"marker serialization failed — check serde/serde_json versions and feature flags\");\n        // abort init: marker must persist before conversion is deemed complete\n        return Err(e.into());\n    }\n    other => other?,\n}","preventionTips":["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"],"tags":["serde","json-serialization","influxdb3"],"backgroundTag":"json-serialization-failed","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}