{"record":{"id":"140175792d887d81","repo":"apache/iceberg","slug":"no-such-table-s-in-s","errorCode":null,"errorMessage":"No such table '%s' in '%s'","messagePattern":"No such table '(.+?)' in '(.+?)'","errorType":"exception","errorClass":"NoSuchTableException","httpStatus":404,"severity":"error","filePath":"nessie/src/main/java/org/apache/iceberg/nessie/NessieTableOperations.java","lineNumber":86,"sourceCode":"\n  @Override\n  protected void doRefresh() {\n    try {\n      client.refresh();\n    } catch (NessieNotFoundException e) {\n      throw new UncheckedIOException(\n          String.format(\n              \"Failed to refresh as ref '%s' is no longer valid.\", client.getRef().getName()),\n          e);\n    }\n    String metadataLocation = null;\n    Reference reference = client.getRef().getReference();\n    try {\n      Content content = client.getApi().getContent().key(key).reference(reference).get().get(key);\n      LOG.debug(\"Content '{}' at '{}': {}\", key, reference, content);\n      if (content == null) {\n        if (currentMetadataLocation() != null) {\n          throw new NoSuchTableException(\"No such table '%s' in '%s'\", key, reference);\n        }\n      } else {\n        this.table =\n            content\n                .unwrap(IcebergTable.class)\n                .orElseThrow(() -> new NessieContentNotFoundException(key, reference.getName()));\n        metadataLocation = table.getMetadataLocation();\n      }\n    } catch (NessieNotFoundException ex) {\n      if (currentMetadataLocation() != null) {\n        throw new NoSuchTableException(ex, \"No such table '%s'\", key);\n      }\n    }\n    refreshFromMetadataLocation(\n        metadataLocation,\n        null,\n        2,\n        location ->","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/nessie/src/main/java/org/apache/iceberg/nessie/NessieTableOperations.java#L68-L104","documentation":"During NessieTableOperations.doRefresh, content lookup for the table key returned null while the operations instance already had loaded metadata (currentMetadataLocation() != null). This means the table existed previously but was deleted on the current ref, so NessieTableOperations throws NoSuchTableException naming the key and reference. The null is tolerated only when the table was never loaded.","triggerScenarios":"Refreshing a loaded table after it was dropped on the same branch; a concurrent drop committed between operations; reading through a ref where another process deleted the key.","commonSituations":"Long-running streaming query refreshing a table another job dropped; mistaken drop on the wrong branch; snapshot-style tag lookups where key was removed.","solutions":["Confirm the table key exists on the ref (catalog.tableExists) before/after the concurrent operation.","Re-load the catalog/table on the correct branch where the table still exists.","If the drop was unintended, restore the key by committing the previous IcebergTable content back to Nessie or resetting the branch to a prior hash.","Coordinate drop/refresh jobs so tables aren't deleted mid-use."],"exampleFix":"// before\nTable t = catalog.loadTable(id); // refresh later fails: dropped concurrently\n// after\nif (catalog.tableExists(id)) {\n  Table t = catalog.loadTable(id);\n  // use t quickly, or re-check existence before each refresh\n}","handlingStrategy":"validation","validationCode":"if (!catalog.tableExists(key)) { throw new IllegalStateException(\"Table dropped on ref \" + catalog.getRef().getName()); }","typeGuard":null,"tryCatchPattern":"try { table.refresh(); } catch (NoSuchTableException e) { table = catalog.loadTable(key); }","preventionTips":["Coordinate drop operations with readers/streams","Re-check existence before refresh in long-running jobs","Use Nessie tags for stable reads of tables that may be dropped on branches"],"tags":["nessie","table","not-found","concurrency","drop"],"backgroundTag":"entity-not-found","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}