{"record":{"id":"3887dac09b250eab","repo":"influxdata/influxdb","slug":"failed-to-initialize-table-index-cache","errorCode":null,"errorMessage":"Failed to initialize table index cache: {}","messagePattern":"Failed to initialize table index cache: (.+?)","errorType":"exception","errorClass":"WriteBufferInit","httpStatus":null,"severity":"critical","filePath":"influxdb3/src/commands/serve.rs","lineNumber":1780,"sourceCode":"        table_index_cache_config,\n        Arc::clone(&object_store),\n    );\n\n    info!(\n        node_id = &*node_id,\n        max_entries = ?table_index_cache_config.max_entries,\n        concurrency_limit = table_index_cache_config.concurrency_limit,\n        \"Initializing table index cache\"\n    );\n\n    // Initialize table index cache from any existing snapshots\n    //\n    // This needs to happen before WAL snapshotting, retention handling, or hard deletion could\n    // begin executing so we have a quiescent time during which we can transform\n    // `PersistedSnapshot` to `TableIndexSnapshot` to `TableIndex` to completion.\n    table_index_cache.initialize().await.map_err(|e| {\n        warn!(\"Failed to initialize table index cache: {}\", e);\n        Error::WriteBufferInit(anyhow::anyhow!(\n            \"Failed to initialize table index cache: {}\",\n            e\n        ))\n    })?;\n\n    // Create and start the retention period handler\n    let retention_handler = Arc::new(RetentionPeriodHandler::new(\n        table_index_cache.clone(),\n        Arc::clone(&catalog),\n        Arc::clone(&time_provider) as _,\n        retention_check_interval,\n        node_id,\n    ));\n\n    tokio::spawn(async move {\n        retention_handler\n            .background_task(retention_handler_token)\n            .await","sourceCodeStart":1762,"sourceCodeEnd":1798,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3/src/commands/serve.rs#L1762-L1798","documentation":"Not the thiserror message itself but the anyhow error text: when table_index_cache.initialize() fails during write-buffer startup, the code logs a warning and wraps the cause into Error::WriteBufferInit with this message. It aborts server startup because the table index cache must be ready before WAL snapshotting/retention begin.","triggerScenarios":"table_index_cache.initialize().await returns Err during serve startup — typically from corrupt WAL/persisted snapshot data or I/O failures while transforming PersistedSnapshot into table indexes.","commonSituations":"Corrupt or incomplete data directory, disk full or permission errors, or running a binary version that cannot read snapshots written by a newer version.","solutions":["Check the preceding warn! log line for the underlying TableIndexCacheError cause.","Verify disk space, permissions, and integrity of the node's data directory.","Restore the data directory from a backup if WAL/snapshot files are corrupt.","Pin/upgrade to a compatible influxdb3 version for the existing data files."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"null","typeGuard":null,"tryCatchPattern":"match init_result {\n    Err(Error::WriteBufferInit(e)) if e.to_string().contains(\"table index cache\") => {\n        // check disk space/permissions, restore data dir from backup\n    }\n    other => other?,\n}","preventionTips":["Monitor disk usage on the data directory.","Allow clean shutdowns so WAL/snapshots stay consistent.","Test upgrades on a copy of the data directory first.","Maintain regular backups of the node data directory."],"tags":["startup","cache","storage","write-buffer"],"backgroundTag":"module-init-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"}