{"record":{"id":"87c512a0df0f8d16","repo":"influxdata/influxdb","slug":"parse-int-error-0","errorCode":null,"errorMessage":"parse int error: {0}","messagePattern":"parse int error: (.+?)","errorType":"error_code","errorClass":"PersisterError","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/persister.rs","lineNumber":65,"sourceCode":"\n#[derive(Debug, thiserror::Error)]\npub enum PersisterError {\n    #[error(\"datafusion error: {0}\")]\n    DataFusion(#[from] DataFusionError),\n\n    #[error(\"serde_json error: {0}\")]\n    SerdeJson(#[from] serde_json::Error),\n\n    #[error(\"object_store error: {0}\")]\n    ObjectStore(#[from] object_store::Error),\n\n    #[error(\"parquet error: {0}\")]\n    ParquetError(#[from] parquet::errors::ParquetError),\n\n    #[error(\"tried to serialize a parquet file with no rows\")]\n    NoRows,\n\n    #[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\")]","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/persister.rs#L47-L83","documentation":"PersisterError::ParseInt wraps a std::num::ParseIntError from parsing integer components out of persisted file names or metadata strings (e.g. the sequence number or timestamp segments of parquet paths). Via `#[from]`, any failing `str::parse::<u64>()` inside the persister becomes this variant.","triggerScenarios":"Persister parses numeric fields from object-store paths or manifest strings (e.g. splitting a parquet filename to extract the sequence number) and the segment is not a valid integer.","commonSituations":"Non-numeric or empty path segments from malformed file names in the bucket; files written by older influxdb3 versions with different naming; manual file manipulation in object storage.","solutions":["Check the inner ParseIntError message and the string being parsed (usually embedded in the surrounding context).","Rename or remove the offending file so it matches the canonical naming scheme.","Ensure all writers use the same influxdb3 version producing the same file layout.","Avoid writing additional files into the influxdb3 object-store prefix by external tooling."],"exampleFix":"// before: parsing an arbitrary path segment\nlet seq: u64 = parts.last().unwrap().parse()?;\n// after: validate shape before parsing\nlet seq: u64 = parts\n    .last()\n    .ok_or_else(|| anyhow!(\"missing sequence segment\"))?\n    .parse()?;","handlingStrategy":"validation","validationCode":"let seq: u64 = seq_str.parse().map_err(|e| format!(\"bad sequence '{seq_str}': {e}\"))?;","typeGuard":"fn parse_u64(s: &str) -> Option<u64> { s.parse::<u64>().ok() }","tryCatchPattern":"match result {\n    Err(PersisterError::ParseInt(e)) => eprintln!(\"non-numeric path segment: {e}\"),\n    Err(e) => return Err(e.into()),\n    Ok(v) => v,\n}","preventionTips":["Validate filename segments are numeric before calling path-parsing APIs.","Filter object-store listings to files matching the canonical pattern.","Do not place foreign files into influxdb3 storage prefixes."],"tags":["parsing","integer","file-naming","rust","wrapper-error"],"backgroundTag":"invalid-argument-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"}