{"record":{"id":"7401deb4aced493c","repo":"influxdata/influxdb","slug":"object-store-path-error-0","errorCode":null,"errorMessage":"object store path error: {0}","messagePattern":"object store path error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/lib.rs","lineNumber":48,"sourceCode":"use influxdb3_cache::{distinct_cache::DistinctCacheProvider, last_cache::LastCacheProvider};\nuse influxdb3_catalog::catalog::{\n    Catalog, CatalogSequenceNumber, DatabaseSchema, INTERNAL_DB_NAME, TableDefinition,\n};\nuse influxdb3_id::{DbId, ParquetFileId, SerdeVecMap, TableId};\nuse influxdb3_types::DatabaseName;\npub use influxdb3_types::write::Precision;\nuse influxdb3_wal::{SnapshotSequenceNumber, Wal, WalFileSequenceNumber};\nuse iox_query::QueryChunk;\nuse iox_time::Time;\nuse observability_deps::tracing::debug;\nuse schema::TIME_COLUMN_NAME;\nuse serde::{Deserialize, Serialize};\nuse std::{fmt::Debug, sync::Arc};\nuse thiserror::Error;\n\n#[derive(Debug, Error)]\npub enum Error {\n    #[error(\"object store path error: {0}\")]\n    ObjStorePath(#[from] object_store::path::Error),\n\n    #[error(\"write buffer error: {0}\")]\n    WriteBuffer(#[from] write_buffer::Error),\n\n    #[error(\"persister error: {0}\")]\n    Persister(#[from] persister::PersisterError),\n\n    #[error(\"queries not supported in compactor only mode\")]\n    CompactorOnly,\n\n    #[error(\"unexpected: {0:?}\")]\n    Anyhow(#[from] anyhow::Error),\n}\n\npub type Result<T, E = Error> = std::result::Result<T, E>;\n\npub trait WriteBuffer: Bufferer + ChunkContainer + DistinctCacheManager + LastCacheManager {}","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/lib.rs#L30-L66","documentation":"This is the ObjStorePath variant of influxdb3_write::Error, thrown when an object_store::path::Error occurs while constructing or parsing an object-store path (e.g. a database/table/segment key in object storage). The library surfaces it because nearly all persistence goes through object-store paths, and an invalid path is a hard failure before any I/O happens. The original object_store error is preserved as the source.","triggerScenarios":"Calling any write/persist API that builds an object-store Path (e.g. writing a parquet file, chunk key, or catalog entry) with a component containing characters object_store rejects, an empty path segment, or a path that fails `Path::from`/`Path::parse` validation.","commonSituations":"Database or table names with invalid characters (spaces, control chars, leading/trailing slashes) flowing into storage keys; migrating data with legacy names; tests constructing raw Path values; object_store version changes tightening path validation.","solutions":["Inspect the inner object_store::path::Error message to identify the offending path segment","Sanitize/validate database and table names before writing (restrict to safe characters, trim slashes)","Use object_store::path::Path::from or parse with error handling at the boundary instead of building strings ad hoc","Check object_store version changelog for changed path validation rules"],"exampleFix":"// before\nlet path = format!(\"databases/{}/tables/{}\", db_name, table_name); // may contain invalid chars\n// after\nlet safe_db: String = db_name.chars().map(|c| if c.is_alphanumeric() || c=='_' || c=='-' { c } else { '_' }).collect();\nlet path = object_store::path::Path::from(format!(\"databases/{}/tables/{}\", safe_db, table_name));","handlingStrategy":"validation","validationCode":"fn validate_path_component(s: &str) -> Result<(), String> {\n    if s.is_empty() || s.starts_with('/') || s.ends_with('/') || s.chars().any(|c| c.is_control()) {\n        return Err(format!(\"invalid object-store path component: {:?}\", s));\n    }\n    Ok(())\n}","typeGuard":"fn is_safe_component(s: &str) -> bool {\n    !s.is_empty() && s.chars().all(|c| c.is_alphanumeric() || c == '_' || c == '-')\n}","tryCatchPattern":"match result {\n    Err(e @ influxdb3_write::Error::ObjStorePath(p)) => {\n        log::error!(\"object store path issue: {} (source: {})\", e, p);\n        // sanitize inputs and retry or abort\n    }\n    other => other?,\n}","preventionTips":["Sanitize database/table names into safe path components before writing","Validate path strings with object_store::path::Path::parse at API boundaries","Pin and review object_store version changes affecting path validation","Never build storage keys from raw user input without normalization"],"tags":["rust","object-store","path"],"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"}