apache/iceberg · warning

An error occurred reloading table

Error message

An error occurred reloading table {}, table was not reloaded

What it means

CachingTableSupplier.refreshTable() periodically reloads the table metadata in the background; if the reload throws, the error is logged and the stale cached Table continues to be served. Data may be written against outdated metadata until the next successful refresh.

Solutions

  1. Check the logged exception cause for the actual reload failure (auth, network, missing metadata)
  2. Fix catalog connectivity/credentials; restart the job after long-running token/refresh failures
  3. Avoid aggressive snapshot expiration by other jobs while active writers hold table references
  4. Increase refresh retry/backoff or alert on repeated reload failures so staleness is detected
Defensive patterns

Strategy: retry

Validate before calling

// Check catalog reachability before relying on background refresh
catalog.loadTable(tableIdentifier); // fail fast at job submission

Try / catch

Table reloaded;
try {
  reloaded = tableLoader.loadTable();
} catch (Exception e) {
  LOG.warn("reload failed, serving stale table", e);
  // schedule retry with backoff
}

Prevention

When it happens

Trigger: testTableReload calls refreshTable() and tableLoader.loadTable() throws: catalog connectivity failures, authentication/authorization errors, snapshot expiry removing the referenced snapshot, or corrupt/missing metadata files.

Common situations: Catalog outages or credential expiry in long-running Flink jobs; the table's snapshots expired by another maintenance job while the sink holds a cached reference; network partition between the job and the REST/Hive catalog.

Related errors


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

Appendix: source

Thrown at flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/CachingTableSupplier.java:87

  }

  void refreshTable() {
    if (System.currentTimeMillis() > lastLoadTimeMillis + tableRefreshInterval.toMillis()) {
      try {
        if (!tableLoader.isOpen()) {
          tableLoader.open();
        }

        this.table = tableLoader.loadTable();
        this.lastLoadTimeMillis = System.currentTimeMillis();

        LOG.info(
            "Table {} reloaded, next min load time threshold is {}",
            table.name(),
            DateTimeUtil.formatTimestampMillis(
                lastLoadTimeMillis + tableRefreshInterval.toMillis()));
      } catch (Exception e) {
        LOG.warn("An error occurred reloading table {}, table was not reloaded", table.name(), e);
      }
    }
  }
}

View on GitHub (pinned to 86d9c8fc54)