apache/iceberg · warning
Deleted only {} of {} files from table {} using bulk deletes
Error message
Deleted only {} of {} files from table {} using bulk deletes What it means
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.
Source
Thrown at flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/DeleteFilesProcessor.java:111
public void processWatermark(Watermark mark) {
deleteFiles();
}
@Override
public void prepareSnapshotPreBarrier(long checkpointId) {
deleteFiles();
}
private void deleteFiles() {
try {
io.deleteFiles(filesToDelete);
LOG.info(
"Deleted {} files from table {} using bulk deletes", filesToDelete.size(), tableName);
succeededCounter.inc(filesToDelete.size());
filesToDelete.clear();
} catch (BulkDeletionFailureException e) {
int deletedFilesCount = filesToDelete.size() - e.numberFailedObjects();
LOG.warn(
"Deleted only {} of {} files from table {} using bulk deletes",
deletedFilesCount,
filesToDelete.size(),
tableName,
e);
succeededCounter.inc(deletedFilesCount);
failedCounter.inc(e.numberFailedObjects());
}
}
}
View on GitHub (pinned to 86d9c8fc54)
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
Defensive patterns
Strategy: retry
Validate before calling
// check FileIO permissions on target prefixes before deleting fileIO.listPrefix(prefix);
Try / catch
try {
fileIO.deleteAll(files);
} catch (BulkDeletionFailureException e) {
int deleted = total - e.numberFailedObjects();
// retry failed files or schedule orphan cleanup
} Prevention
- 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
When it happens
Trigger: Calling deleteAllWithRePrefix/bulk delete on the FileIO for accumulated filesToDelete throws BulkDeletionFailureException with numberFailedObjects() > 0 — some objects could not be removed from object storage.
Common situations: S3/GCS/OSS transient errors or throttling during bulk delete; objects already removed concurrently; permission issues on some prefixes; expired credentials mid-batch.
Related errors
- Deleted only {} of {} files from table {} using bulk deletes
- Deleted only {} of {} files from table {} using bulk deletes
- Failed to delete uncommitted DV {} for table {} task {}
- Failed to check the state of the lock %s
- Interrupted during unlock
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/d2faf939d13c7835.
Report an issue: GitHub.