{"record":{"id":"918da7fac8ad21fb","repo":"influxdata/influxdb","slug":"tableindex-operation-failed","errorCode":null,"errorMessage":"TableIndex operation failed","messagePattern":"TableIndex operation failed","errorType":"exception","errorClass":"TableIndexCacheError","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/table_index_cache.rs","lineNumber":48,"sourceCode":"    ParquetFile,\n    paths::{\n        SnapshotInfoFilePath, TableIndexConversionCompletedPath, TableIndexPath,\n        TableIndexSnapshotPath,\n    },\n    table_index::{CoreTableIndex, IndexMetadata, TableIndex, TableIndexSnapshot},\n};\n\nuse thiserror::Error;\n\n#[derive(Debug, Error)]\npub enum TableIndexCacheError {\n    #[error(\"Object store operation failed\")]\n    ObjectStore(#[source] object_store::Error),\n\n    #[error(\"JSON serialization/deserialization failed\")]\n    Json(#[source] serde_json::Error),\n\n    #[error(\"TableIndex operation failed\")]\n    TableIndex(#[source] crate::table_index::TableIndexError),\n\n    #[error(\"Object meta is missing filename\")]\n    MissingFilename,\n\n    #[error(\"Failed to parse snapshot sequence number from filename\")]\n    InvalidSnapshotSequenceNumber,\n\n    #[error(\"Unexpected error\")]\n    Unexpected(#[source] anyhow::Error),\n\n    #[error(\"Table snapshot persistence task failed\")]\n    TableSnapshotPersistenceTaskFailed(#[source] tokio::task::JoinError),\n\n    #[error(\"Failed to list table indices from object store\")]\n    ListIndices(#[source] object_store::Error),\n\n    #[error(\"Failed to parse table index path from object store path\")]","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/table_index_cache.rs#L30-L66","documentation":"TableIndexCacheError::TableIndex wraps a crate::table_index::TableIndexError raised while cache-driven operations load, update, create, or split table indexes. It is a pass-through wrapper: the cache delegated work to TableIndexSnapshot/CoreTableIndex and that layer failed, so fix the inner TableIndexError.","triggerScenarios":"TableIndexCache::get_or_load (LoadTableIndexFromObjectStoreError path), update_from_object_store (UpdateTableIndexFromObjectStoreError / CreateTableIndexFromObjectStoreError), and snapshot splitting via TableIndexSnapshot::load_split_persist all surface inner TableIndexErrors through this variant.","commonSituations":"An index snapshot file is corrupt (inner Json), the object store blipped during load (inner ObjectStore), merge mismatches after concurrent updates, or a node ID prefix mismatch making the loaded index belong to another table.","solutions":["Unwrap the #[source] TableIndexError and handle its specific variant (ObjectStore, Json, MergeMismatch, etc.) — this variant is only a wrapper.","If the inner error is ObjectStore/Json, follow those remediation steps (credentials/network or file corruption).","If MergeMismatch, check for concurrent writers using the same node identifier prefix and ensure each node has a unique prefix.","Re-run TableIndexCache::initialize after fixing the root cause to rebuild consistent in-memory state."],"exampleFix":"// before: treating wrapper generically\nErr(TableIndexCacheError::TableIndex(e)) => return Err(e.into()),\n// after: match the inner cause\nErr(TableIndexCacheError::TableIndex(TableIndexError::ObjectStore(oe))) => {\n    warn!(\"transient store error, retrying: {oe}\");\n    retry().await\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn inner_index_error(e: &TableIndexCacheError) -> Option<&TableIndexError> {\n    match e {\n        TableIndexCacheError::TableIndex(inner)\n        | TableIndexCacheError::LoadTableIndexFromObjectStoreError(inner)\n        | TableIndexCacheError::UpdateTableIndexFromObjectStoreError(inner)\n        | TableIndexCacheError::CreateTableIndexFromObjectStoreError(inner) => Some(inner),\n        _ => None,\n    }\n}","tryCatchPattern":"match cache.get_or_load(&id).await {\n    Err(e) if inner_index_error(&e).is_some() => {\n        handle_inner(inner_index_error(&e).unwrap());\n    }\n    other => other?,\n}","preventionTips":["Always unwrap the #[source] chain before choosing a remediation — this variant is only a wrapper","Give each node a unique identifier prefix to avoid merge mismatches","Log the full error chain (source) in operations tooling","Re-run initialize() after fixing inner causes to restore consistent cache state"],"tags":["rust","wrapper-error","table-index","cache"],"backgroundTag":"internal-invariant-violation","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"}