{"record":{"id":"3a9303f833992a76","repo":"risingwavelabs/risingwave","slug":"fail-to-check-exist","errorCode":null,"errorMessage":"Fail to check exist","messagePattern":"Fail to check exist","errorType":"error_code","errorClass":"iceberg::Error(ErrorKind::Unexpected)","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/iceberg/storage_catalog.rs","lineNumber":217,"sourceCode":"\n        // # NOTE\n        // Iceberg rust didn't support rename operation now, so this commit operation is not atomic.\n        let final_metadata_file_path = format!(\n            \"{table_path}/metadata/v{}.metadata.json\",\n            current_version + 1\n        );\n        self.file_io()\n            .new_output(final_metadata_file_path)?\n            .write(serde_json::to_string(&next_metadata)?.into())\n            .await?;\n\n        // write version hint\n        let final_file_path = format!(\"{table_path}/metadata/version-hint.text\");\n        if self\n            .file_io()\n            .exists(final_file_path.as_str())\n            .await\n            .map_err(|_| Error::new(ErrorKind::Unexpected, \"Fail to check exist\"))?\n        {\n            self.file_io().delete(final_file_path.as_str()).await?;\n        }\n        self.file_io()\n            .new_output(final_file_path)?\n            .write(format!(\"{}\", current_version + 1).into())\n            .await?;\n\n        Ok(())\n    }\n}\n\n#[async_trait]\nimpl Catalog for StorageCatalog {\n    /// List namespaces from table.\n    async fn list_namespaces(\n        &self,\n        _parent: Option<&NamespaceIdent>,","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/iceberg/storage_catalog.rs#L199-L235","documentation":"After writing the new metadata file, commit_table must rewrite `version-hint.text`. Before overwriting it calls file_io.exists; if that existence check itself fails (I/O, auth, network), this error wraps the failure because the catalog cannot safely proceed to delete/rewrite the hint.","triggerScenarios":"Calling update_table where the storage backend returns an error on HEAD/stat of `{table_path}/metadata/version-hint.text`: expired or missing credentials, transient network failure, bucket/permission changes mid-operation.","commonSituations":"S3/GCS/Azure credentials rotated or revoked during a long job; bucket policy change removing HeadObject permission; region/endpoint misconfiguration; object-store outage.","solutions":["Check the underlying cause in the chained error source (the wrapped error is discarded here, so enable file_io/opendal logging to see the root cause).","Verify storage credentials and that the principal has read (HEAD) permission on the table's metadata path.","Test connectivity to the object store endpoint (network, DNS, region config).","Retry the commit after transient storage errors are resolved."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight storage access before committing\nfile_io.exists(&format!(\"{table_path}/metadata/version-hint.text\")).await\n    .expect(\"object store unreachable or unauthorized; fix credentials/endpoint before commit\");","typeGuard":null,"tryCatchPattern":"// bounded retry for transient storage failures\nfor attempt in 0..3 {\n    match catalog.commit_table(path, metadata.clone()).await {\n        Err(e) if e.to_string().contains(\"Fail to check exist\") && attempt < 2 => {\n            tokio::time::sleep(Duration::from_secs(1 << attempt)).await;\n            continue;\n        }\n        other => break other,\n    }\n}","preventionTips":["Use long-lived or auto-rotated credentials that outlast long jobs","Grant HEAD/read permissions on the table metadata prefix","Monitor object-store health and endpoint/region configuration"],"tags":["iceberg","storage","object-store","io"],"backgroundTag":"http-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"}