apache/iceberg · warning · UncheckedInterruptedException
Interrupted during refresh
Error message
Interrupted during refresh
What it means
Thrown when the thread is interrupted while loading the current table metadata from the JDBC catalog during refresh. The interrupt flag is re-set before throwing UncheckedInterruptedException. It means a table refresh was cancelled, usually by task cancellation or shutdown.
Source
Thrown at core/src/main/java/org/apache/iceberg/jdbc/JdbcTableOperations.java:76
Map<String, String> catalogProperties,
JdbcUtil.SchemaVersion schemaVersion) {
this.catalogName = catalogName;
this.tableIdentifier = tableIdentifier;
this.fileIO = fileIO;
this.connections = dbConnPool;
this.catalogProperties = catalogProperties;
this.schemaVersion = schemaVersion;
}
@Override
public void doRefresh() {
Map<String, String> table;
try {
table = JdbcUtil.loadTable(schemaVersion, connections, catalogName, tableIdentifier);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new UncheckedInterruptedException(e, "Interrupted during refresh");
} catch (SQLException e) {
// SQL exception happened when getting table from catalog
throw new UncheckedSQLException(
e, "Failed to get table %s from catalog %s", tableIdentifier, catalogName);
}
if (table.isEmpty()) {
if (currentMetadataLocation() != null) {
throw new NoSuchTableException(
"Failed to load table %s from catalog %s: dropped by another process",
tableIdentifier, catalogName);
} else {
this.disableRefresh();
return;
}
}
String newMetadataLocation = table.get(METADATA_LOCATION_PROP);View on GitHub (pinned to 86d9c8fc54)
Solutions
- Investigate what interrupted the thread (task cancellation, shutdown hook) and whether cancellation was intended.
- Retry the operation in a fresh, non-interrupted thread if cancellation was spurious.
- Avoid long-blocking operations before refresh that increase the interruption window.
- Check pool exhaustion — threads waiting long on connections are more likely to be interrupted by timeouts.
Defensive patterns
Strategy: retry
Try / catch
try {
table.refresh();
} catch (UncheckedInterruptedException e) {
Thread.currentThread().interrupt(); // preserve interrupt status
// abort or reschedule the refresh
} Prevention
- Preserve interrupt status when catching InterruptedException.
- Avoid interrupting worker threads during table commits/refreshes except for genuine cancellation.
- Check pool wait times; long waits increase cancellation exposure.
When it happens
Trigger: JdbcTableOperations.doRefresh() calls JdbcUtil.loadTable(...), which acquires a pooled connection and runs a query; an InterruptedException from pool acquisition (thread interrupted) triggers it.
Common situations: Spark/Flink task cancellation during query execution, executor shutdown while refresh is in flight, application kill/cancel during catalog access.
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 SQL query
- Interrupted during refresh
- Interrupted during commit
- Interrupted in call to initialize
- Interrupted during tryLock
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/da5619461a5a4150.
Report an issue: GitHub.