apache/iceberg · error · RuntimeException
Interrupted during commit
Error message
Interrupted during commit
What it means
Thrown by defaultWarehouseLocation when the thread is interrupted while waiting for a metastore client during default table-location resolution. The handler restores the interrupt flag before wrapping the exception in a RuntimeException (message text is a legacy carry-over from the commit path). It indicates deliberate cancellation, not a metastore fault.
Solutions
- Treat as cancellation: stop the operation or rerun after the interrupting condition is resolved.
- Don't schedule table creation on threads managed by short-lived executors that shut down eagerly.
- Investigate which component issues the interrupt if it is unexpected.
Defensive patterns
Strategy: try-catch
Validate before calling
if (Thread.currentThread().isInterrupted()) { /* do not start table creation */ } Try / catch
try {
catalog.createTable(ident, schema);
} catch (RuntimeException e) {
if (e.getCause() instanceof InterruptedException) { /* cancelled: clean up and stop */ }
throw e;
} Prevention
- Run table creation on threads that are not cancelled mid-flight
- Handle executor shutdown before issuing metadata mutations
- Retain idempotent create flows so cancelled attempts can be safely retried
When it happens
Trigger: Interrupt delivered during clients.run in defaultWarehouseLocation, typically while creating a table from a thread being cancelled or shut down.
Common situations: Executor shutdown mid-table-creation; Spark/Flink task cancellation; test harness timeouts interrupting the caller.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
Related errors
- Interrupted in call to getDatabase(name)
- Interrupted during isHeld
- Interrupted during refresh
- Interrupted during tryLock
- Interrupted in call to check table existence of
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/eea4b230f0b14e66.
Report an issue: GitHub.
Appendix: source
Thrown at hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:780
try {
Database databaseData =
clients.run(client -> client.getDatabase(tableIdentifier.namespace().levels()[0]));
if (databaseData.getLocationUri() != null) {
// If the database location is set use it as a base.
String databaseLocation = LocationUtil.stripTrailingSlash(databaseData.getLocationUri());
return String.format("%s/%s", databaseLocation, tableLocation);
}
} catch (NoSuchObjectException e) {
throw new NoSuchNamespaceException(
e, "Namespace does not exist: %s", tableIdentifier.namespace().levels()[0]);
} catch (TException e) {
throw new RuntimeException(
String.format("Metastore operation failed for %s", tableIdentifier), e);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("Interrupted during commit", e);
}
// Otherwise, stick to the {WAREHOUSE_DIR}/{DB_NAME}.db/{TABLE_NAME} path
String databaseLocation = databaseLocation(tableIdentifier.namespace().levels()[0]);
return String.format("%s/%s", databaseLocation, tableLocation);
}
private String databaseLocation(String databaseName) {
String warehouseLocation = conf.get(HiveConf.ConfVars.METASTOREWAREHOUSE.varname);
Preconditions.checkNotNull(
warehouseLocation, "Warehouse location is not set: hive.metastore.warehouse.dir=null");
warehouseLocation = LocationUtil.stripTrailingSlash(warehouseLocation);
return String.format("%s/%s.db", warehouseLocation, databaseName);
}
private Map<String, String> convertToMetadata(Database database) {
Map<String, String> meta = Maps.newHashMap();View on GitHub (pinned to 86d9c8fc54)