{"record":{"id":"3632a91c30c0b4ea","repo":"influxdata/influxdb","slug":"object-meta-is-missing-filename-table-index-cache","errorCode":null,"errorMessage":"Object meta is missing filename","messagePattern":"Object meta is missing filename","errorType":"exception","errorClass":"TableIndexCacheError","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/table_index_cache.rs","lineNumber":51,"sourceCode":"        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\")]\n    TableIndexPath(#[source] crate::paths::PathError),\n\n    #[error(\"Failed to list table index snapshots from object store\")]","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/table_index_cache.rs#L33-L69","documentation":"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.","triggerScenarios":"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).","commonSituations":"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 '/'.","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."],"exampleFix":"// before\nlet last_seq_number = SnapshotInfoFilePath::parse_sequence_number(\n    last.location.filename().ok_or(TableIndexCacheError::MissingFilename)?,\n)\n// after: skip filename-less metas while collecting\nlet filename = meta.location.filename().ok_or(TableIndexCacheError::MissingFilename)?;\n// (filter metas without filenames when building snapshot_metas)","handlingStrategy":"validation","validationCode":"// skip filename-less metas before using a listing\nlet metas: Vec<_> = stream.try_collect::<Vec<_>>().await?\n    .into_iter()\n    .filter(|m| m.location.filename().is_some())\n    .collect();","typeGuard":"fn has_filename(meta: &object_store::ObjectMeta) -> bool {\n    meta.location.filename().is_some()\n}","tryCatchPattern":"match location.filename() {\n    Some(name) => parse_sequence(name),\n    None => {\n        debug!(\"skipping filename-less object {}\", location);\n        continue;\n    }\n}","preventionTips":["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"],"tags":["object-store","path-parsing","rust"],"backgroundTag":"resource-not-found","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"}