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 cached Table object so the sink sees current metadata. If the reload throws, the supplier logs this warning and keeps serving the previously loaded (stale) table rather than failing the writer. The stale table can later cause commit conflicts or outdated schema/spec usage.

Solutions

  1. Check the appended exception in the log for the underlying catalog load failure and address it (network, credentials, permissions).
  2. Verify the table still exists and the job was not left running after a DROP/RENAME.
  3. Increase tableRefreshInterval if the catalog is being overwhelmed or timing out.
  4. Ensure credentials/FileIO configuration support periodic re-authentication for long-running jobs.

Example fix

// before: short interval, catalog throttled
options.set(UPDATE_CHECK_INTERVAL, Duration.ofSeconds(1));
// after: sane interval
options.set(UPDATE_CHECK_INTERVAL, Duration.ofMinutes(1));
Defensive patterns

Strategy: retry

Try / catch

// treat stale table as best-effort; alert on repeated warnings
if (logWarnCountFor(table.name()) > threshold) {
  failJobOrAlert("table reload keeps failing");
}

Prevention

When it happens

Trigger: The scheduled table reload inside refreshTable() throws any Exception — typically the Catalog.table load failing due to network issues, expired credentials, permission changes, or the table being dropped/renamed concurrently.

Common situations: Metastore or REST catalog briefly unreachable; AWS credentials rotated; concurrent DROP TABLE during a running Flink job; refresh interval shorter than catalog latency causing timeouts.

Related errors


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

Appendix: source

Thrown at flink/v2.2/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)