Skip to content

Iceberg REST listTables fails with 404 when a table is dropped while it is listing #1798

Closed

Description

@moomindani

Describe the bug

GET /v1/{prefix}/namespaces/{namespace}/tables lists a schema's tables and then, for every table it
just listed, asks the repository whether that table carries UniForm Iceberg metadata
(getTableUniformMetadataLocation -> findTableOrThrow). The second resolution happens after the
page was read, so a table dropped in between makes the lookup throw TABLE_NOT_FOUND, and the whole
listing fails with a 404 that names a table the client never asked about. A listing is a read of a
schema; another session dropping an unrelated table should not be able to fail it.

To Reproduce

Steps to reproduce the behavior:

  1. Start the server and create a schema with a few dozen tables.
  2. From four threads, request GET .../namespaces/{schema}/tables in a loop.
  3. From four more threads, repeatedly create and delete a table in the same schema, each thread using
    its own table names.
  4. Watch the listings fail:
successful listings: 30172
failures: 6641
  x584  404 {"error":{"message":"Table not found: unity.race2.c1_1", ... ,"code":404}}
  x573  404 {"error":{"message":"Table not found: unity.race2.c3_2", ... ,"code":404}}
  ...

About 18% of the listings failed over a 20-second run, and every failure named one of the tables
being created and dropped, not anything the request referred to.

Expected behavior

The listing returns the uniform tables of the schema. A table created or dropped after a page was
read is simply absent from, or present in, the result; it does not fail the request.

System [please complete the following information]:

  • OS: macOS 26.5 (Darwin 25.6.0), JDK 17
  • Unity Catalog: main at c9ed6b1, H2 backend. Not environment specific -- the second resolution
    is unconditional.

Additional context

The same second resolution also costs two queries per listed table (a schema lookup and a table
lookup inside findTableOrThrow), on top of the query that read the page. Answering whether a table
is uniform from the row the page was already read from removes the failure and that cost together. I
have a fix and a test ready to submit.

Activity

  1. added a commit that references this issue on Sep 9, 2026
    c81bb9c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions