{"record":{"id":"6b68846b2c80c953","repo":"influxdata/influxdb","slug":"failed-to-create-table-index-from-object-store","errorCode":null,"errorMessage":"Failed to create table index from object store","messagePattern":"Failed to create table index from object store","errorType":"exception","errorClass":"TableIndexCacheError","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/table_index_cache.rs","lineNumber":102,"sourceCode":"    #[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\")]\n    CreateTableIndexFromObjectStoreError(#[source] crate::table_index::TableIndexError),\n\n    #[error(\"Failed to delete parquet file {path} from object store\")]\n    DeleteParquetFile {\n        path: String,\n        #[source]\n        source: object_store::Error,\n    },\n\n    #[error(\"Failed to delete table index {table_id} from object store\")]\n    DeleteTableIndex {\n        table_id: TableIndexId,\n        #[source]\n        source: object_store::Error,\n    },\n}\n\npub type Result<T> = std::result::Result<T, TableIndexCacheError>;","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/table_index_cache.rs#L84-L120","documentation":"TableIndexCacheError::CreateTableIndexFromObjectStoreError is thrown when constructing a brand-new TableIndex from object-store snapshot data fails. Like its siblings it wraps a crate::table_index::TableIndexError via #[source]. This is the cold-start path: no cached index existed, so one had to be built from persisted snapshots and that build failed.","triggerScenarios":"First access to a database/table index in the TableIndexCache (cache miss) where building the index from object-store snapshots returns a TableIndexError — snapshot objects missing/unreadable, deserialization failure, or store error.","commonSituations":"Fresh node or restarted server bootstrapping its cache against an empty/partial bucket; bucket region or prefix misconfiguration pointing at the wrong snapshot location; snapshots deleted by retention/GC while still referenced; permissions on the bucket denying reads.","solutions":["Check the wrapped #[source] TableIndexError for object-not-found vs permission vs parse failures.","Verify the object store bucket/prefix configuration matches where snapshots were written.","Ensure bucket IAM credentials grant read access to snapshot objects.","If no snapshots exist for a legitimately empty database, bootstrap an empty index instead of treating this as fatal."],"exampleFix":"// before\nlet idx = cache.get_or_create_index(db, table).await?;\n// after: diagnose source before failing\nlet idx = cache.get_or_create_index(db, table).await\n  .map_err(|e| { log::error!(\"create index failed: {e}; source={:?}\", e.source()); e })?;","handlingStrategy":"try-catch","validationCode":"// Rust: verify the database snapshot prefix exists before cold create\nlet list = object_store.list(Some(&db_snapshot_prefix)).next().await;\nmatch list {\n  None => log::warn!(\"no snapshots under prefix; expect empty index\"),\n  Some(Err(e)) => return Err(e.into()),\n  _ => {}\n}","typeGuard":"fn is_create_index_err(e: &TableIndexCacheError) -> bool {\n  matches!(e, TableIndexCacheError::CreateTableIndexFromObjectStoreError(_))\n}","tryCatchPattern":"match cache.get_or_create_index(db, table).await {\n  Err(TableIndexCacheError::CreateTableIndexFromObjectStoreError(src)) => {\n    if is_object_not_found(&src) { bootstrap_empty_index(db, table).await } else { Err(src.into()) }\n  }\n  other => other,\n}","preventionTips":["Verify bucket/prefix config once at deploy time with a smoke read.","Grant the node's IAM identity read access to the snapshot prefix.","Avoid sharing the InfluxDB bucket with unrelated workloads.","Bootstrap empty databases explicitly so cold misses are expected states."],"tags":["object-store","influxdb3","table-index","cold-start"],"backgroundTag":"object-store-operation-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"}