influxdata/influxdb · critical · WriteBufferInit

Failed to initialize table index cache

Error message

Failed to initialize table index cache: {}

What it means

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.

Solutions

  1. Check the preceding warn! log line for the underlying TableIndexCacheError cause.
  2. Verify disk space, permissions, and integrity of the node's data directory.
  3. Restore the data directory from a backup if WAL/snapshot files are corrupt.
  4. Pin/upgrade to a compatible influxdb3 version for the existing data files.
Defensive patterns

Strategy: try-catch

Validate before calling

null

Try / catch

match init_result {
    Err(Error::WriteBufferInit(e)) if e.to_string().contains("table index cache") => {
        // check disk space/permissions, restore data dir from backup
    }
    other => other?,
}

Prevention

When it happens

Trigger: 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.

Common situations: Corrupt or incomplete data directory, disk full or permission errors, or running a binary version that cannot read snapshots written by a newer version.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/3887dac09b250eab. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3/src/commands/serve.rs:1780

        table_index_cache_config,
        Arc::clone(&object_store),
    );

    info!(
        node_id = &*node_id,
        max_entries = ?table_index_cache_config.max_entries,
        concurrency_limit = table_index_cache_config.concurrency_limit,
        "Initializing table index cache"
    );

    // Initialize table index cache from any existing snapshots
    //
    // This needs to happen before WAL snapshotting, retention handling, or hard deletion could
    // begin executing so we have a quiescent time during which we can transform
    // `PersistedSnapshot` to `TableIndexSnapshot` to `TableIndex` to completion.
    table_index_cache.initialize().await.map_err(|e| {
        warn!("Failed to initialize table index cache: {}", e);
        Error::WriteBufferInit(anyhow::anyhow!(
            "Failed to initialize table index cache: {}",
            e
        ))
    })?;

    // Create and start the retention period handler
    let retention_handler = Arc::new(RetentionPeriodHandler::new(
        table_index_cache.clone(),
        Arc::clone(&catalog),
        Arc::clone(&time_provider) as _,
        retention_check_interval,
        node_id,
    ));

    tokio::spawn(async move {
        retention_handler
            .background_task(retention_handler_token)
            .await

View on GitHub (pinned to 06200ef96b)