{"record":{"id":"9ac19f105f1e16a1","repo":"apache/iceberg","slug":"the-iceberg-transaction-has-been-committed-but-we-9ac19f","errorCode":null,"errorMessage":"The iceberg transaction has been committed, but we failed to clean the temporary flink manifests: {}","messagePattern":"The iceberg transaction has been committed, but we failed to clean the temporary flink manifests: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/FlinkManifestUtil.java","lineNumber":181,"sourceCode":"  static void deleteCommittedManifests(\n      String tableName,\n      FileIO io,\n      List<ManifestFile> manifestsPath,\n      String newFlinkJobId,\n      long checkpointId) {\n    for (ManifestFile manifest : manifestsPath) {\n      try {\n        io.deleteFile(manifest.path());\n      } catch (Exception e) {\n        // The flink manifests cleaning failure shouldn't abort the completed checkpoint.\n        String details =\n            MoreObjects.toStringHelper(FlinkManifestUtil.class)\n                .add(\"tableName\", tableName)\n                .add(\"flinkJobId\", newFlinkJobId)\n                .add(\"checkpointId\", checkpointId)\n                .add(\"manifestPath\", manifest)\n                .toString();\n        LOG.warn(\n            \"The iceberg transaction has been committed, but we failed to clean the temporary flink manifests: {}\",\n            details,\n            e);\n      }\n    }\n  }\n}\n","sourceCodeStart":163,"sourceCodeEnd":189,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/FlinkManifestUtil.java#L163-L189","documentation":"FlinkManifestUtil logs this warning when an Iceberg snapshot has already been committed successfully but deletion of the temporary Flink-written manifest files (or manifest lists) failed. The commit itself is durable, so this is a cleanup/housekeeping problem, not a data-loss problem; orphan files remain in the table location until expired by snapshot expiration.","triggerScenarios":"deleteCommittedManifests is invoked after a checkpoint/jobgraph commit and the underlying FileIO.delete of a manifest or manifest-list path throws (e.g. transient S3/HDFS outage, permission denied on the table location, concurrent snapshot expiration already removed the file).","commonSituations":"Object-store eventual-consistency or throttling (S3 503) during delete; IAM/storage permissions lacking delete on the metadata dir; job crash between commit and cleanup; files already deleted by expireSnapshots running concurrently.","solutions":["Verify the table data is correct — the commit succeeded, no action is needed for correctness.","Check FileIO/storage credentials and permissions allow deletion in the table metadata directory.","Run expireSnapshots / removeOrphanFiles to garbage-collect the leftover manifests.","Retry the job; if the warning persists, inspect the wrapped exception (logged as 'e') for the storage-side cause."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// ensure FileIO can delete in the table location before committing\nio.deleteFile(testManifestPath); // or check permissions via a dry-run delete of a temp file","typeGuard":null,"tryCatchPattern":"try { FlinkManifestUtil.deleteCommittedManifests(...); } catch (Exception e) { LOG.warn(\"manifest cleanup deferred; run expireSnapshots\", e); }","preventionTips":["Grant delete permissions on the table metadata location to the Flink job's storage credentials","Schedule regular expireSnapshots/removeOrphanFiles to reclaim orphan manifests","Monitor this warn and alert only if it repeats, indicating persistent storage issues"],"tags":["flink","cleanup","io","logging"],"backgroundTag":"file-write-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}