Skip to content

loadTableMetadata treats every catalog failure as a missing table #9635

Description

@mengw15

What happened?

IcebergUtil.loadTableMetadata, and load_table_metadata in the Python worker, return None for any exception, not only for a table that does not exist:

try {
  Some(catalog.loadTable(identifier))
} catch {
  case _: Exception => None
}

So when the catalog cannot be read (Lakekeeper restarting, a timeout), it looks to every caller like a missing table:

  • result-service answers 404 "the result of operator X is no longer stored" for a result that exists. If the catalog fails after the result was opened, it answers 200 with an empty page and rowCount: 0.
  • In the computing unit, a page request fails with "No storage is found for the given URI", which names the wrong cause, and the agent's synchronous execution returns an empty result.
  • IcebergDocument.getCount returns 0, and a document's iterator reads as empty, in the JVM and in the Python worker.

Only a table or namespace that does not exist should be reported as missing. Any other failure should reach the caller. This came up in the reviews of #9356 and #9556.

How to reproduce?

In ResultResourceSpec, replace the default catalog with one whose loadTable fails, then read a stored result:

class FailingCatalog(delegate: Catalog, succeeding: Int) extends CountingCatalog(delegate) {
  override def loadTable(identifier: TableIdentifier): Table = {
    if (loadTableCalls.get() >= succeeding) throw new RuntimeException("catalog unavailable")
    super.loadTable(identifier)
  }
}

// succeeding = 0: the catalog is unavailable
get(owner, pagesPath(eid)).getStatus shouldBe 500 // 404 on main

// succeeding = 1: the result opens, then the catalog fails
get(owner, pagesPath(eid)).getStatus shouldBe 500 // 200 with an empty table on main

Version/Branch

1.4.0-incubating-SNAPSHOT (main)

Activity

  1. added theissue type on Nov 23, 2026
  2. added a commit that references this issue on Nov 23, 2026
    c15f724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions