{"record":{"id":"a1670bac753403b5","repo":"risingwavelabs/risingwave","slug":"enable-manifest-rewrite-is-not-supported-for-ice","errorCode":null,"errorMessage":"`enable_manifest_rewrite` is not supported for Iceberg format version 3 because rewrite manifests cannot preserve row lineage","messagePattern":"`enable_manifest_rewrite` is not supported for Iceberg format version 3 because rewrite manifests cannot preserve row lineage","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/config.rs","lineNumber":775,"sourceCode":"            .await\n            .map_err(Into::into)\n    }\n\n    pub fn full_table_name(&self) -> Result<TableIdent> {\n        self.table.to_table_ident().map_err(Into::into)\n    }\n\n    pub fn catalog_name(&self) -> String {\n        self.common.catalog_name()\n    }\n\n    pub fn table_format_version(&self) -> FormatVersion {\n        self.format_version\n    }\n\n    pub fn validate_manifest_rewrite_format(&self, format_version: FormatVersion) -> Result<()> {\n        if self.enable_manifest_rewrite && format_version >= FormatVersion::V3 {\n            return Err(SinkError::Config(anyhow!(\n                \"`enable_manifest_rewrite` is not supported for Iceberg format version 3 because rewrite manifests cannot preserve row lineage\"\n            )));\n        }\n        Ok(())\n    }\n\n    pub fn compaction_interval_sec(&self) -> u64 {\n        // default to 1 hour\n        self.compaction_interval_sec.unwrap_or(3600)\n    }\n\n    /// Calculate the timestamp (in milliseconds) before which snapshots should be expired\n    /// Returns `current_time_ms` - `max_age_millis`\n    pub fn snapshot_expiration_timestamp_ms(&self, current_time_ms: i64) -> Option<i64> {\n        self.snapshot_expiration_max_age_millis\n            .map(|max_age_millis| current_time_ms - max_age_millis)\n    }\n","sourceCodeStart":757,"sourceCodeEnd":793,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/config.rs#L757-L793","documentation":"`validate_manifest_rewrite_format` rejects enabling manifest rewrite on Iceberg format version 3 tables. In v3, manifest files must preserve row lineage, which rewriting manifests would destroy, so the combination `enable_manifest_rewrite = true` + `format_version >= V3` is an error.","triggerScenarios":"Creating/updating an Iceberg sink with `enable_manifest_rewrite` true while the target table metadata reports format version 3 (checked via `validate_manifest_rewrite_format(format_version)`).","commonSituations":"Table upgraded to format version 3 (e.g. by another engine) while the sink still carries `enable_manifest_rewrite = true`; new tables defaulting to v3 with old sink configs copied from v1/v2 setups.","solutions":["Remove or set `enable_manifest_rewrite = false` in the sink options.","Or recreate/keep the target table at format version 2 if manifest rewrite is required.","Check table.metadata().format_version() before enabling the feature.","Update sink templates that predate format v3 support."],"exampleFix":"-- before\nWITH ( enable_manifest_rewrite = true )\n-- after\nWITH ( enable_manifest_rewrite = false )","handlingStrategy":"validation","validationCode":"let fv = table.metadata().format_version();\nif enable_manifest_rewrite && fv >= FormatVersion::V3 {\n    return Err(\"disable enable_manifest_rewrite for format v3 tables\");\n}","typeGuard":"fn manifest_rewrite_allowed(fv: FormatVersion, enable: bool) -> bool { !enable || fv < FormatVersion::V3 }","tryCatchPattern":"match sink_result {\n    Err(SinkError::Config(m)) if m.to_string().contains(\"enable_manifest_rewrite\") => {\n        // recreate sink without enable_manifest_rewrite\n    }\n    other => other?,\n}","preventionTips":["Check table format version before enabling manifest rewrite","Drop enable_manifest_rewrite from templates targeting v3 tables","Track warehouse-side upgrades to format v3"],"tags":["iceberg","config","incompatibility"],"backgroundTag":"conflicting-config-options","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}