{"record":{"id":"c25a51975cb30514","repo":"apache/iceberg","slug":"failed-to-delete-uncommitted-dv-for-table-ta-c25a51","errorCode":null,"errorMessage":"Failed to delete uncommitted DV {} for table {} task {}","messagePattern":"Failed to delete uncommitted DV (.+?) for table (.+?) task (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertCommitter.java","lineNumber":281,"sourceCode":"    return removedEqDeleteNumCounter.getCount();\n  }\n\n  /**\n   * Deletes the DVs this cycle wrote but did not commit (abort or definite commit failure). Only\n   * the newly written DVs are removed; rewritten DVs remain referenced on the target branch. Best\n   * effort: a delete failure is logged, not propagated, so it never masks the original error.\n   */\n  private void deleteUncommittedDVs() {\n    for (DVWriteResult result : bufferedResults) {\n      if (result.isAbort()) {\n        continue;\n      }\n\n      for (DeleteFile dvFile : result.dvFiles()) {\n        try {\n          table.io().deleteFile(dvFile.location());\n        } catch (RuntimeException e) {\n          LOG.warn(\n              \"Failed to delete uncommitted DV {} for table {} task {}\",\n              dvFile.location(),\n              tableName,\n              taskName,\n              e);\n        }\n      }\n    }\n  }\n\n  private RowDelta buildRowDelta(\n      List<DataFile> dataFiles, List<DeleteFile> allDvFiles, List<DeleteFile> allRewrittenDvFiles) {\n    RowDelta rowDelta = table.newRowDelta();\n\n    // Fail the commit on external target-branch activity since the planner's snapshot. The next\n    // trigger detects the change and reindexes.\n    if (planResult.mainSnapshotId() != null) {\n      rowDelta.validateFromSnapshot(planResult.mainSnapshotId());","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertCommitter.java#L263-L299","documentation":"This is a warning logged by the Flink maintenance EqualityConvertCommitter when it cannot physically delete a deletion-vector file that was written by a task but never committed to the table (e.g. after a failure mid-commit). The table state is unaffected since the DV was never committed, but the file remains as garbage that an ExpireSnapshots/RemoveOrphanFiles cleanup should eventually remove.","triggerScenarios":"deleteUncommittedDVs iterates result.dvFiles() and calls table.io().deleteFile(dvFile.location()) after a commit decision; any RuntimeException from the FileIO (network blip, permissions, S3 throttling) triggers the log for that file.","commonSituations":"Object-store transient 5xx/throttling during maintenance jobs; IAM or HDFS permissions lacking delete on the table's data location; the file already deleted by concurrent cleanup causing a not-found runtime exception.","solutions":["Ignore in most cases: run RemoveOrphanFiles/ExpireSnapshots afterwards to clean the leftover file","Check the underlying exception in the log for the real cause (permissions vs network vs already-deleted)","Verify the Flink job's filesystem credentials/roles include delete permissions on the table location","Retry the maintenance job if the deletion was due to a transient storage error"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Ensure cleanup is available\nassert table.io() != null;\n// Later run RemoveOrphanFiles to collect leftovers","typeGuard":null,"tryCatchPattern":"try { table.io().deleteFile(dvFile.location()); } catch (RuntimeException e) { LOG.warn(\"leftover DV {} will be cleaned by RemoveOrphanFiles\", dvFile.location(), e); }","preventionTips":["Schedule RemoveOrphanFiles periodically to sweep uncommitted DVs","Grant the job's credentials delete rights on the table location","Watch for repeated warnings — persistent failures indicate permission or connectivity issues"],"tags":["flink","fileio","cleanup"],"backgroundTag":"file-delete-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"}