{"record":{"id":"36500fe49dcff4c2","repo":"quickwit-oss/quickwit","slug":"kinesis-stream-name-cannot-be-updated","errorCode":null,"errorMessage":"Kinesis stream_name cannot be updated","messagePattern":"Kinesis stream_name cannot be updated","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-config/src/source_config/mod.rs","lineNumber":502,"sourceCode":"}\n\n#[derive(Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize, utoipa::ToSchema)]\n#[serde(try_from = \"KinesisSourceParamsInner\")]\npub struct KinesisSourceParams {\n    pub stream_name: String,\n    #[serde(flatten)]\n    pub region_or_endpoint: Option<RegionOrEndpoint>,\n    /// When backfill mode is enabled, the source exits after reaching the end of the stream.\n    #[serde(skip_serializing_if = \"is_false\")]\n    pub enable_backfill_mode: bool,\n}\n\nimpl KinesisSourceParams {\n    fn validate_update(&self, other: &Self) -> anyhow::Result<()> {\n        // Changing the stream would likely mess up the checkpoints because the\n        // Kinesis shard IDs are used as metastore checkpoint PartitionId, and\n        // there uniqueness is only guaranteed within a stream.\n        ensure!(\n            self.stream_name == other.stream_name,\n            \"Kinesis stream_name cannot be updated\"\n        );\n        ensure!(\n            self.region_or_endpoint == other.region_or_endpoint,\n            \"Kinesis region or endpoint cannot be updated\"\n        );\n        Ok(())\n    }\n}\n\n#[derive(Clone, Debug, Eq, PartialEq, Deserialize)]\n#[serde(deny_unknown_fields)]\nstruct KinesisSourceParamsInner {\n    pub stream_name: String,\n    pub region: Option<String>,\n    pub endpoint: Option<String>,\n    #[serde(default)]","sourceCodeStart":484,"sourceCodeEnd":520,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-config/src/source_config/mod.rs#L484-L520","documentation":"Kinesis source params cannot have their `stream_name` changed via an update. Kinesis shard IDs are used as metastore checkpoint PartitionIds and their uniqueness is only guaranteed within a stream, so switching streams would make stored checkpoints ambiguous. `KinesisSourceParams::validate_update` rejects updates where the stream name differs.","triggerScenarios":"Calling the source update API/CLI with a Kinesis source config whose `stream_name` differs from the stored source, hitting validate_update before the update is applied.","commonSituations":"Migrating ingestion to a new Kinesis stream and attempting an in-place update; staging vs production stream names swapped in the config; region rename causing operators to recreate the stream and point the source at it.","solutions":["Create a new Kinesis source bound to the new stream instead of updating the existing source.","If migration is required: delete the old source and create a new one, then reset/adjust checkpoints knowingly.","For other param changes, re-submit keeping `stream_name` unchanged."],"exampleFix":"// before: update source with stream_name: logs-2026\n// (original stream_name: logs-2025) -> rejected\n\n// after: create a new source\nquickwit source create --index my-index --source-config kinesis-2026.json","handlingStrategy":"validation","validationCode":"let current = client.get_source(index_id, source_id).await?;\nif current.params.stream_name != new_params.stream_name {\n    return Err(\"Kinesis stream_name is immutable; create a new source\".into());\n}\nclient.update_source(index_id, source_id, new_params).await?;","typeGuard":null,"tryCatchPattern":"match client.update_source(index_id, source_id, params).await {\n    Err(e) if e.to_string().contains(\"stream_name cannot be updated\") => {\n        client.delete_source(index_id, source_id).await?;\n        client.create_source(index_id, source_config_new_stream).await?;\n    }\n    other => other?,\n}","preventionTips":["Name sources after their stream (e.g. kinesis-logs-2026) so stream changes imply new sources.","Never reuse a source config file across streams without changing the source_id.","Diff params against the stored source before update calls."],"tags":["kinesis","source","validation","checkpoint"],"backgroundTag":"unsupported-operation","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}