influxdata/influxdb · error

valid object store URL

Error message

valid object store URL

What it means

DataSourceExecInput construction parses an object store URL built from the store's id (iox://{id}/). ObjectStoreUrl::parse only fails for malformed URLs, so this expect fires only if the store id contains characters that make the resulting URL invalid (spaces, control chars, bad percent-encoding).

Solutions

  1. Validate/sanitize the storage id when the store is created so it is URL-safe
  2. Percent-encode the id before interpolation
  3. Fix upstream metadata that assigned a malformed id

Example fix

// before
ObjectStoreUrl::parse(format!("iox://{}/", self.id)).expect("valid object store URL")
// after
let id = percent_encode(self.id.as_bytes(), NON_ALPHANUMERIC);
ObjectStoreUrl::parse(format!("iox://{}/", id)).expect("valid object store URL")
Defensive patterns

Strategy: validation

Validate before calling

fn is_url_safe(id: &str) -> bool { !id.is_empty() && id.bytes().all(|b| b.is_ascii_alphanumeric() || b == b'-' || b == b'_' || b == b'.') }

Type guard

fn valid_store_id(id: &str) -> Option<&str> { if is_url_safe(id) { Some(id) } else { None } }

Prevention

When it happens

Trigger: Creating a DataSourceExecInput from a ParquetStorage whose internal id string is not a valid URL host/authority component.

Common situations: Ids sourced from user input, config, or catalog metadata containing whitespace, slashes beyond the template, or unencoded special characters.

Understand the failure class

Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/f553ccf238b3c626. Report an issue: GitHub.

Appendix: source

Thrown at core/parquet_file/src/storage.rs:427

            "Created and uploaded parquet file (parallelized)"
        );

        Ok((parquet_meta, file_size))
    }

    /// Inputs for [`DataSourceExec`].
    ///
    /// See [`DataSourceExecInput`] for more information.
    ///
    /// [`DataSourceExec`]: datafusion::datasource::memory::DataSourceExec
    pub fn data_source_exec_input(
        &self,
        path: &ParquetFilePath,
        file_size: u64,
    ) -> DataSourceExecInput {
        DataSourceExecInput {
            object_store_url: ObjectStoreUrl::parse(format!("iox://{}/", self.id))
                .expect("valid object store URL"),
            object_store: Arc::clone(&self.object_store),
            object_meta: ObjectMeta {
                location: path.object_store_path(),
                // we don't care about the "last modified" field
                last_modified: Default::default(),
                size: file_size,
                e_tag: None,
                version: None,
            },
        }
    }
}

/// Error during projecting parquet file data to an expected schema.
#[derive(Debug, Error)]
pub enum ProjectionError {
    /// Unknown field.
    #[error("Unknown field: {0}")]

View on GitHub (pinned to 06200ef96b)