apache/iceberg · warning

max_concurrent_deletes only works with FileIOs that do not s

Error message

max_concurrent_deletes only works with FileIOs that do not support bulk deletes. This table is currently using {} which supports bulk deletes so the parameter will be ignored. See that IO's documentation to learn how to adjust parallelism for that particular IO's bulk delete.

What it means

Same as expire_snapshots: remove_orphan_files' max_concurrent_deletes option only applies to FileIOs that do not support bulk deletes. With a SupportsBulkOperations IO the parameter is ignored and this warning is logged.

Source

Thrown at spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/procedures/RemoveOrphanFilesProcedure.java:170

          if (olderThanMillis != null) {
            boolean isTesting = Boolean.parseBoolean(spark().conf().get("spark.testing", "false"));
            if (!isTesting) {
              validateInterval(olderThanMillis);
            }
            action.olderThan(olderThanMillis);
          }

          if (location != null) {
            action.location(location);
          }

          if (dryRun) {
            action.deleteWith(file -> {});
          }

          if (maxConcurrentDeletes != null) {
            if (table.io() instanceof SupportsBulkOperations) {
              LOG.warn(
                  "max_concurrent_deletes only works with FileIOs that do not support bulk deletes. This "
                      + "table is currently using {} which supports bulk deletes so the parameter will be ignored. "
                      + "See that IO's documentation to learn how to adjust parallelism for that particular "
                      + "IO's bulk delete.",
                  table.io().getClass().getName());
            } else {

              action.executeDeleteWith(executorService(maxConcurrentDeletes, "remove-orphans"));
            }
          }

          if (fileListView != null) {
            action.compareToFileList(spark().table(fileListView));
          }

          action.equalSchemes(equalSchemes);
          action.equalAuthorities(equalAuthorities);

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Drop max_concurrent_deletes from the remove_orphan_files call
  2. Configure the FileIO's own bulk-delete concurrency/batch properties instead
  3. Inspect table.io().getClass() in the warning and consult that IO's docs

Example fix

// before
CALL iceberg.system.remove_orphan_files(table => 'db.t', max_concurrent_deletes => 10)
-- after
CALL iceberg.system.remove_orphan_files(table => 'db.t')
Defensive patterns

Strategy: validation

Validate before calling

if (table.io() instanceof org.apache.iceberg.io.SupportsBulkOperations) { /* skip max_concurrent_deletes for remove_orphan_files */ }

Type guard

boolean bulkDeletes = table.io() instanceof org.apache.iceberg.io.SupportsBulkOperations;

Prevention

When it happens

Trigger: CALL iceberg.system.remove_orphan_files(...) with max_concurrent_deletes set while the table's FileIO implements SupportsBulkOperations.

Common situations: S3/GCS-backed tables where users expect max_concurrent_deletes to speed orphan cleanup; bulk-delete IOs handle parallelism internally.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/7d8d23de5aec558a. Report an issue: GitHub.