{"record":{"id":"24ac6cd9c05252f1","repo":"apache/iceberg","slug":"deleted-only-of-files-from-table-using-bu-24ac6c","errorCode":null,"errorMessage":"Deleted only {} of {} files from table {} using bulk deletes","messagePattern":"Deleted only (.+?) of (.+?) files from table (.+?) using bulk deletes","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/DeleteFilesProcessor.java","lineNumber":111,"sourceCode":"  public void processWatermark(Watermark mark) {\n    deleteFiles();\n  }\n\n  @Override\n  public void prepareSnapshotPreBarrier(long checkpointId) {\n    deleteFiles();\n  }\n\n  private void deleteFiles() {\n    try {\n      io.deleteFiles(filesToDelete);\n      LOG.info(\n          \"Deleted {} files from table {} using bulk deletes\", filesToDelete.size(), tableName);\n      succeededCounter.inc(filesToDelete.size());\n      filesToDelete.clear();\n    } catch (BulkDeletionFailureException e) {\n      int deletedFilesCount = filesToDelete.size() - e.numberFailedObjects();\n      LOG.warn(\n          \"Deleted only {} of {} files from table {} using bulk deletes\",\n          deletedFilesCount,\n          filesToDelete.size(),\n          tableName,\n          e);\n      succeededCounter.inc(deletedFilesCount);\n      failedCounter.inc(e.numberFailedObjects());\n    }\n  }\n}\n","sourceCodeStart":93,"sourceCodeEnd":122,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/DeleteFilesProcessor.java#L93-L122","documentation":"Logged by DeleteFilesProcessor when a BulkDeletionFailureException is caught during bulk file deletion: the FileIO's bulk delete partially succeeded, deleting only `deletedFilesCount` of the requested files. The processor counts the succeeded files, keeps the remainder in filesToDelete for a later retry, and logs which table was affected. This is expected behavior of FileIO.bulkDelete implementations (e.g. S3/Hadoop) that report per-object failures.","triggerScenarios":"Raised in DeleteFilesProcessor.deleteFiles (called from processElement, processWatermark, prepareSnapshotPreBarrier) when FileIO.bulkDelete throws BulkDeletionFailureException with numberFailedObjects() > 0 — i.e. some objects in the batch could not be deleted from the object store/filesystem.","commonSituations":"S3 eventual-consistency/rate-limiting during large bulk deletes; permission errors on some prefixes; files already deleted by a concurrent orphan-cleanup or compaction job; transient 503s from the object store under load.","solutions":["No immediate action needed for the counted successes; the failed files remain in the batch and are retried on the next delete cycle","Check object-store side errors (throttling, permissions) in the nested exception and raise request rate limits or fix ACLs","Avoid running concurrent maintenance jobs that delete the same files","If failures persist, delete files individually (non-bulk path) to isolate the problematic objects"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Processor already retries remaining files internally; user side:\n// monitor succeeded vs total counts in metrics and alert on persistent shortfalls","preventionTips":["Raise object-store request-rate limits to survive bulk deletes","Fix ACLs/IAM so the task identity can delete all data prefixes","Don't run competing orphan-cleanup jobs concurrently with rewrite cleanup"],"tags":["flink","file-deletion","object-store","partial-failure"],"backgroundTag":"partial-bulk-delete-failure","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}