{"record":{"id":"091d010e964bb357","repo":"risingwavelabs/risingwave","slug":"iceberg-error-0","errorCode":null,"errorMessage":"Iceberg error: {0}","messagePattern":"Iceberg error: (.+?)","errorType":"exception","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/mod.rs","lineNumber":1108,"sourceCode":"    #[error(\"Kafka error: {0}\")]\n    Kafka(#[from] rdkafka::error::KafkaError),\n    #[error(\"Kinesis error: {0}\")]\n    Kinesis(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"Remote sink error: {0}\")]\n    Remote(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"Encode error: {0}\")]\n    Encode(String),\n    #[error(\"Avro error: {0}\")]\n    Avro(#[from] apache_avro::Error),\n    #[error(\"Iceberg error: {0}\")]\n    Iceberg(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"config error: {0}\")]\n    Config(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"coordinator error: {0}\")]\n    Coordinator(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"ClickHouse error: {0}\")]","sourceCodeStart":1090,"sourceCodeEnd":1126,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/mod.rs#L1090-L1126","documentation":"A `SinkError::Iceberg` variant built from an `anyhow::Error`. RisingWave's Iceberg sink throws this whenever the underlying `icelake`/iceberg writer or catalog operations fail; the display string is \"Iceberg error: {0}\" and the cause chain plus backtrace are preserved. It is a generic umbrella for all Iceberg-data-path failures in the sink.","triggerScenarios":"Writing records to an Iceberg table from the sink: opening the table via the catalog, building/writing parquet data files, committing snapshots (commits to the catalog), or any `icelake` API returning an error that the sink converts with `.into()`/`anyhow!`.","commonSituations":"Wrong catalog configuration (REST/Hive/Glue catalog URL, warehouse path, credentials); S3/object-store misconfiguration (endpoint, region, bucket permissions); schema mismatch between the RisingWave sink plan and the existing Iceberg table schema; concurrent commit conflicts or stale metadata after table evolution.","solutions":["Read the wrapped anyhow message and its `source` chain — it points to the failing stage (catalog open, parquet write, commit).","Verify catalog properties in the sink `WITH` options (catalog type, URI, warehouse, namespace, table) and the object-store credentials/endpoint.","Compare the sink's derived schema with the target Iceberg table schema; drop/recreate or evolve the table so they match.","Retry or investigate commit failures — concurrent writers can conflict; ensure only expected writers commit to the table."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"async fn check_iceberg_target(catalog: &dyn Catalog, ns: &str, table: &str) -> anyhow::Result<()> {\n    let identifiers = catalog.list_tables(&NamespaceIdent::from_str(ns)?).await?;\n    anyhow::ensure!(identifiers.iter().any(|t| t.name() == table), \"iceberg table {ns}.{table} not found\");\n    Ok(())\n}","typeGuard":"fn as_iceberg_error(err: &SinkError) -> Option<&anyhow::Error> {\n    if let SinkError::Iceberg(e) = err { Some(e) } else { None }\n}","tryCatchPattern":"match sink.commit().await {\n    Err(SinkError::Iceberg(e)) => {\n        log::error!(\"iceberg failure: {e:#}\"); // full cause chain\n        // classify: config vs transient commit conflict, then retry or fix config\n    }\n    Err(e) => return Err(e.into()),\n    Ok(_) => {}\n}","preventionTips":["Dry-run catalog and object-store connectivity (list namespace/table) before creating the sink.","Keep sink schema and target Iceberg table schema in sync; evolve the table intentionally.","Use distinct writer identities to avoid frequent commit conflicts.","Log with `{e:#}` (anyhow alternate) to see the full source chain of the wrapped error."],"tags":["iceberg","sink","object-storage","risingwave"],"backgroundTag":"database-write-failed","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"}