influxdata/influxdb · error · TableIndexCacheError
Object meta is missing filename
Error message
Object meta is missing filename
What it means
TableIndexCacheError::MissingFilename is returned when an object_store::ObjectMeta in a listing has no filename component in its location. The cache needs the filename to extract the snapshot sequence number while converting persisted snapshots, and a directory-like or otherwise filename-less path cannot provide it.
Solutions
- Inspect the snapshot info prefix in the object store and delete any zero-byte directory-placeholder objects (common with S3 console-created folders).
- Re-run startup/initialize after cleaning the prefix so the listing contains only real snapshot files.
- If you control the listing code, filter out metas whose location has no filename before selecting the last snapshot.
- Verify the configured node identifier prefix points at the correct snapshot directory.
Example fix
// before
let last_seq_number = SnapshotInfoFilePath::parse_sequence_number(
last.location.filename().ok_or(TableIndexCacheError::MissingFilename)?,
)
// after: skip filename-less metas while collecting
let filename = meta.location.filename().ok_or(TableIndexCacheError::MissingFilename)?;
// (filter metas without filenames when building snapshot_metas) Defensive patterns
Strategy: validation
Validate before calling
// skip filename-less metas before using a listing
let metas: Vec<_> = stream.try_collect::<Vec<_>>().await?
.into_iter()
.filter(|m| m.location.filename().is_some())
.collect(); Type guard
fn has_filename(meta: &object_store::ObjectMeta) -> bool {
meta.location.filename().is_some()
} Try / catch
match location.filename() {
Some(name) => parse_sequence(name),
None => {
debug!("skipping filename-less object {}", location);
continue;
}
} Prevention
- Do not create console "folder" placeholder objects inside snapshot prefixes
- Filter listings on the canonical filename pattern before consuming them
- Audit snapshot prefixes after manual bucket operations
When it happens
Trigger: During split_persisted_snapshots_to_table_index_snapshots, the last listed snapshot meta's location.filename() returns None and the code does ok_or(TableIndexCacheError::MissingFilename) (table_index_cache.rs:440).
Common situations: Listing a prefix that unexpectedly contains a directory placeholder (e.g. S3 console-created zero-byte "folder" objects), or custom prefix configurations that yield paths ending in '/'.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- table index error
- another process has written to the WAL ahead of this one
- Cannot parse object store config
- Failed to list table indices from object store
- Failed to load table index from object store
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/3632a91c30c0b4ea.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_write/src/table_index_cache.rs:51
TableIndexSnapshotPath,
},
table_index::{CoreTableIndex, IndexMetadata, TableIndex, TableIndexSnapshot},
};
use thiserror::Error;
#[derive(Debug, Error)]
pub enum TableIndexCacheError {
#[error("Object store operation failed")]
ObjectStore(#[source] object_store::Error),
#[error("JSON serialization/deserialization failed")]
Json(#[source] serde_json::Error),
#[error("TableIndex operation failed")]
TableIndex(#[source] crate::table_index::TableIndexError),
#[error("Object meta is missing filename")]
MissingFilename,
#[error("Failed to parse snapshot sequence number from filename")]
InvalidSnapshotSequenceNumber,
#[error("Unexpected error")]
Unexpected(#[source] anyhow::Error),
#[error("Table snapshot persistence task failed")]
TableSnapshotPersistenceTaskFailed(#[source] tokio::task::JoinError),
#[error("Failed to list table indices from object store")]
ListIndices(#[source] object_store::Error),
#[error("Failed to parse table index path from object store path")]
TableIndexPath(#[source] crate::paths::PathError),
#[error("Failed to list table index snapshots from object store")]View on GitHub (pinned to 06200ef96b)