{"record":{"id":"4521b9c3f7512ed5","repo":"influxdata/influxdb","slug":"failed-to-parse-snapshot-sequence-number-from-filename","errorCode":null,"errorMessage":"failed to parse snapshot sequence number from filename","messagePattern":"failed to parse snapshot sequence number from filename","errorType":"error_code","errorClass":"PersisterError","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/persister.rs","lineNumber":83,"sourceCode":"    #[error(\"parse int error: {0}\")]\n    ParseInt(#[from] std::num::ParseIntError),\n\n    #[error(\"unexpected persister error: {0:?}\")]\n    Unexpected(#[from] anyhow::Error),\n\n    #[error(\"table snapshot persistence task panicked: {0}\")]\n    TableSnapshotPersistenceTaskFailed(#[source] tokio::task::JoinError),\n\n    #[error(\"snapshot manifest parse task panicked: {0}\")]\n    SnapshotParseTaskFailed(#[source] tokio::task::JoinError),\n\n    #[error(\"table index error: {0}\")]\n    TableIndexPathError(#[source] crate::paths::PathError),\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\nimpl From<PersisterError> for DataFusionError {\n    fn from(error: PersisterError) -> Self {\n        match error {\n            PersisterError::DataFusion(e) => e,\n            PersisterError::ObjectStore(e) => DataFusionError::ObjectStore(Box::new(e)),\n            PersisterError::ParquetError(e) => DataFusionError::ParquetError(Box::new(e)),\n            _ => DataFusionError::External(Box::new(error)),\n        }\n    }\n}\n\npub type Result<T, E = PersisterError> = std::result::Result<T, E>;\n\npub const DEFAULT_OBJECT_STORE_URL: &str = \"iox://influxdb3/\";\nconst MAX_CONCURRENT_CHECKPOINT_LOADS: usize = 10;","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/persister.rs#L65-L101","documentation":"PersisterError::InvalidSnapshotSequenceNumber is raised when the snapshot sequence number cannot be parsed out of a snapshot filename during enumeration. Snapshot files encode their sequence number in the name (parsed via crate::paths helpers); a name that does not contain a valid number breaks ordering of snapshots and is rejected. It is thrown from the persister while listing or resolving the latest snapshot.","triggerScenarios":"Listing snapshot objects and parsing each filename for its sequence number; any file under the snapshot prefix whose name does not embed a parseable u64 sequence number triggers this when the persister builds SnapshotInfoFilePath/TableIndexPath metadata.","commonSituations":"Someone placed custom or corrupted files in the snapshot directory; a partially-uploaded file with a truncated name; migrating snapshots between InfluxDB3 versions that changed the filename convention.","solutions":["List the snapshot prefix and identify the object whose filename has no valid sequence number","Delete or rename the offending object to the canonical filename format","Re-verify snapshot ordering by restarting the writer and confirming it loads the latest snapshot cleanly","If files were copied from another environment, re-persist snapshots through the writer instead of copying raw objects"],"exampleFix":"// before\ncp snapshot.json snapshots/snapshot.json\n// after: name must embed the sequence number\ncp snapshot.json snapshots/0000000042.persisted_snapshot.json","handlingStrategy":"validation","validationCode":"fn parse_snapshot_seq(name: &str) -> Option<u64> {\n    name.split('.').next()?.parse::<u64>().ok()\n}\n// pre-scan the snapshot prefix and reject/repair files where parse_snapshot_seq is None","typeGuard":"fn is_valid_snapshot_file(key: &object_store::path::Path) -> bool {\n    key.filename().map(|f| parse_snapshot_seq(f).is_some()).unwrap_or(false)\n}","tryCatchPattern":"match res {\n    Err(PersisterError::InvalidSnapshotSequenceNumber) => {\n        log::error(\"non-canonical snapshot filename in store; skipping/rebuilding\");\n    }\n    other => other?,\n}","preventionTips":["Only let the writer create snapshot objects; never cp/mv raw files into the prefix","Validate filenames after restoring snapshots from backup","Use consistent InfluxDB3 versions across nodes sharing a bucket","Monitor snapshot prefixes for unexpected files"],"tags":["object-store","filename-parsing","snapshot","persistence"],"backgroundTag":"invalid-identifier-format","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"}