{"record":{"id":"d2faf939d13c7835","repo":"apache/iceberg","slug":"deleted-only-of-files-from-table-using-bu-d2faf9","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.3/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.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/DeleteFilesProcessor.java#L93-L122","documentation":"DeleteFilesProcessor.deleteFiles logs this warning when a bulk delete partially fails: a BulkDeletionFailureException reports how many objects failed, and the processor computes how many of the queued files were actually deleted. Failed files remain undeleted and the counters are updated accordingly.","triggerScenarios":"Calling deleteAllWithRePrefix/bulk delete on the FileIO for accumulated filesToDelete throws BulkDeletionFailureException with numberFailedObjects() > 0 — some objects could not be removed from object storage.","commonSituations":"S3/GCS/OSS transient errors or throttling during bulk delete; objects already removed concurrently; permission issues on some prefixes; expired credentials mid-batch.","solutions":["Check the attached BulkDeletionFailureException for which objects failed and why","Retry the maintenance run — undeleted orphan files can be removed by expire/orphan-file cleanup","Verify FileIO credentials and permissions cover all affected prefixes","Reduce batch size to avoid storage-side throttling during bulk deletes"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// check FileIO permissions on target prefixes before deleting\nfileIO.listPrefix(prefix);","typeGuard":null,"tryCatchPattern":"try {\n  fileIO.deleteAll(files);\n} catch (BulkDeletionFailureException e) {\n  int deleted = total - e.numberFailedObjects();\n  // retry failed files or schedule orphan cleanup\n}","preventionTips":["Verify storage credentials/permissions for all deletion prefixes","Reduce bulk batch size to avoid object-store throttling","Schedule periodic orphan-file cleanup to remove failed deletions"],"tags":["flink","maintenance","file-deletion","object-store","partial-failure"],"backgroundTag":"bulk-delete-partial-failure","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}