{"record":{"id":"fa53a299ec677166","repo":"apache/iceberg","slug":"an-error-occurred-reloading-table-table-was-no-fa53a2","errorCode":null,"errorMessage":"An error occurred reloading table {}, table was not reloaded","messagePattern":"An error occurred reloading table (.+?), table was not reloaded","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/CachingTableSupplier.java","lineNumber":87,"sourceCode":"  }\n\n  void refreshTable() {\n    if (System.currentTimeMillis() > lastLoadTimeMillis + tableRefreshInterval.toMillis()) {\n      try {\n        if (!tableLoader.isOpen()) {\n          tableLoader.open();\n        }\n\n        this.table = tableLoader.loadTable();\n        this.lastLoadTimeMillis = System.currentTimeMillis();\n\n        LOG.info(\n            \"Table {} reloaded, next min load time threshold is {}\",\n            table.name(),\n            DateTimeUtil.formatTimestampMillis(\n                lastLoadTimeMillis + tableRefreshInterval.toMillis()));\n      } catch (Exception e) {\n        LOG.warn(\"An error occurred reloading table {}, table was not reloaded\", table.name(), e);\n      }\n    }\n  }\n}\n","sourceCodeStart":69,"sourceCodeEnd":92,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/CachingTableSupplier.java#L69-L92","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the appended exception in the log for the underlying catalog load failure and address it (network, credentials, permissions).","Verify the table still exists and the job was not left running after a DROP/RENAME.","Increase tableRefreshInterval if the catalog is being overwhelmed or timing out.","Ensure credentials/FileIO configuration support periodic re-authentication for long-running jobs."],"exampleFix":"// before: short interval, catalog throttled\noptions.set(UPDATE_CHECK_INTERVAL, Duration.ofSeconds(1));\n// after: sane interval\noptions.set(UPDATE_CHECK_INTERVAL, Duration.ofMinutes(1));","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// treat stale table as best-effort; alert on repeated warnings\nif (logWarnCountFor(table.name()) > threshold) {\n  failJobOrAlert(\"table reload keeps failing\");\n}","preventionTips":["Monitor catalog availability and set a sane tableRefreshInterval","Use credentials that support renewal for long-running streaming jobs","Don't drop/rename tables while dependent Flink jobs are running"],"tags":["flink","table-refresh","stale-metadata","sink"],"backgroundTag":"table-reload-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}