quickwit-oss/quickwit · error
existing `source_id` {} does not match updated `source_id` {
Error message
existing `source_id` {} does not match updated `source_id` {} What it means
When updating an existing source, the `source_id` embedded in the submitted config must match the `source_id` of the source being replaced. `load_source_config_update` compares the two and fails if they differ, since the update path cannot rename sources — the id identifies the metastore record being overwritten.
Source
Thrown at quickwit/quickwit-config/src/source_config/serialize.rs:77
source_config_for_serialization.validate_and_build()
}
/// Parses and validates a [`SourceConfig`] update.
///
/// Ensures that the new configuration is valid in itself and compared to the
/// current source config. If the new configuration omits some fields, the
/// default values will be used, not those of the current source config.
pub fn load_source_config_update(
config_format: ConfigFormat,
config_content: &[u8],
current_source_config: &SourceConfig,
) -> anyhow::Result<SourceConfig> {
let versioned_source_config: VersionedSourceConfig = config_format.parse(config_content)?;
let source_config_for_serialization: SourceConfigForSerialization =
versioned_source_config.into();
let new_source_config = source_config_for_serialization.validate_and_build()?;
ensure!(
current_source_config.source_id == new_source_config.source_id,
"existing `source_id` {} does not match updated `source_id` {}",
current_source_config.source_id,
new_source_config.source_id
);
current_source_config
.source_params
.validate_update(&new_source_config.source_params)?;
Ok(new_source_config)
}
impl SourceConfigForSerialization {
/// Checks the validity of the `SourceConfig` as a "deserializable source".
///
/// Two remarks:
/// - This does not check connectivity, it just validate configuration, without performing anyView on GitHub (pinned to a39730c5cd)
Solutions
- Edit the submitted config so its `source_id` equals the existing source's id, then retry the update.
- Invoke the update with the correct existing source identifier (e.g. `quickwit source update --source-id <existing>`).
- To genuinely rename a source, delete the old source and create a new one with the new id.
Example fix
// before (source.json used for update)
{"source_id": "kafka-new", "source_type": "kafka", ...} // stored id: kafka-src
// after (source.json)
{"source_id": "kafka-src", "source_type": "kafka", ...} Defensive patterns
Strategy: validation
Validate before calling
let current = client.get_source(index_id, source_id).await?;
let submitted: SourceConfig = parse_source_config(file_content)?;
assert_eq!(submitted.source_id, current.source_id,
"update must target the existing source_id {}", current.source_id); Try / catch
match client.update_source(index_id, source_id, new_config).await {
Err(e) if e.to_string().contains("does not match updated `source_id`") =>
bail!("source_id in the config file must equal the source being updated"),
other => other?,
} Prevention
- Generate update payloads from the fetched current source so source_id stays in sync.
- Never hand-edit source_id when changing other fields of a source config.
- For renames, script delete+create rather than update.
When it happens
Trigger: Calling `update_source` (or `load_source_config_update` directly, e.g. in tests) with a config file whose `source_id`/`versioned` id differs from `current_source_config.source_id`.
Common situations: Editing a source config file and renaming the `source_id` (or the file's id field / CLI `--source-id`) while updating; applying a source config template that carries a different id than the deployed source.
Related errors
- index ID pattern `{pattern}` is invalid: an index ID must ha
- Kafka topic cannot be updated
- Kinesis stream_name cannot be updated
- Kinesis region or endpoint cannot be updated
- failed to parse host: `{host}`
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/173be7ec3229ad41.
Report an issue: GitHub.