{"record":{"id":"90322ca7c5e560f5","repo":"risingwavelabs/risingwave","slug":"failed-to-update-iceberg-table","errorCode":null,"errorMessage":"Failed to update iceberg table.","messagePattern":"Failed to update iceberg table\\.","errorType":"exception","errorClass":"iceberg::Error (ErrorKind::Unexpected)","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/iceberg/jni_catalog.rs","lineNumber":533,"sourceCode":"                );\n\n                let table_metadata = response.metadata;\n\n                let file_io = FileIOBuilder::new(Arc::new(OpenDalResolvingStorageFactory::new()))\n                    .with_props(file_io_props.iter())\n                    .build();\n\n                Ok(Table::builder()\n                    .file_io(file_io)\n                    .identifier(commit.identifier().clone())\n                    .metadata(table_metadata)\n                    .runtime(runtime)\n                    .build()?)\n            })\n        })\n        .await\n        .map_err(|e| {\n            iceberg::Error::new(\n                iceberg::ErrorKind::Unexpected,\n                \"Failed to update iceberg table.\",\n            )\n            .with_source(e)\n        })\n    }\n}\n\nimpl Drop for JniCatalogInner {\n    fn drop(&mut self) {\n        let _ = execute_with_jni_env(self.jvm, |env| {\n            call_method!(env, self.java_catalog.as_obj(), {void close()})\n                .with_context(|| \"Failed to close iceberg catalog\".to_owned())?;\n            Ok(())\n        })\n        .inspect_err(\n            |e| tracing::error!(error = ?e.as_report(), \"Failed to close iceberg catalog\"),\n        );","sourceCodeStart":515,"sourceCodeEnd":551,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/iceberg/jni_catalog.rs#L515-L551","documentation":"JniCatalog::update_table wraps any error from the JNI commit/update call (Java exception during table commit, JNIEnv error, or JoinError from a panicked task) into this Unexpected iceberg error with source attached. The table commit was not applied.","triggerScenarios":"Calling update_table with a TableCommit (schema evolution, partition spec updates, commit of new snapshots) where the underlying Java catalog commit fails or the block_in_place task panics.","commonSituations":"Commit conflicts (the Java side rejects a stale metadata version), auth/backend failures during snapshot commit, JVM misconfiguration when RisingWave commits changes to an Iceberg table.","solutions":["Inspect the source error chain for commit rejections or Java exceptions","Re-load the table to get fresh metadata and retry the commit (conflict handling)","Verify credentials and backend catalog availability","Ensure JVM/classpath is correctly configured for commit-heavy operations"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Reload fresh table metadata before committing to avoid stale-commit conflicts\nlet fresh = catalog.load_table(commit.table()).await?;\n// verify requirements against fresh metadata before update_table","typeGuard":"fn is_jni_update_failure(err: &iceberg::Error) -> bool {\n    err.kind() == iceberg::ErrorKind::Unexpected && err.message().contains(\"Failed to update iceberg table.\")\n}","tryCatchPattern":"match catalog.update_table(commit).await {\n    Err(e) if e.message().contains(\"Failed to update iceberg table.\") => {\n        // reload table, rebuild commit, retry with backoff\n    }\n    other => other,\n}","preventionTips":["Always commit against freshly loaded table metadata","Check the Java-side commit rejection reason (often stale metadata version)","Use bounded retries with backoff for commit conflicts"],"tags":["iceberg","jni","catalog","commit"],"backgroundTag":"api-request-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}