Hi, Kevin:

Thanks for raising this. +1 for this direction.

On Wed, Dec 2, 2026 at 1:57 PM Péter Váry <[email protected]>
wrote:

> Hi Kevin,
>
> Is unregisterTable mandatory? Do we enforce interoperability? Or we will
> rely on well informed users who will migrate only to catalogs where this
> function is available if portability is a concern for them?
>
> Non-destructive fetch of full metadata json would be useful for cases
> where algorithmic processing of table data is needed.
>
> I would definitely go through the cases in our codebase where metadata
> json is used today, and find a solution for them before changing the spec.
> There are some legitimate cases where we want to share the exact, current
> state of the table between multiple executors and we don't want to add more
> load on the catalogs to serve these requests.
>
> Thanks,
> Peter
>
>
>
> On Tue, Dec 1, 2026, 22:29 Xander Bailey <[email protected]> wrote:
>
>> Hi Kevin,
>>
>> +1, and I'd like to push harder on the encryption point. I think it's a
>> core reason to do this.
>>
>> Encrypted tables still keep metadata.json in plaintext, which leaks
>> things like column names (diagnosis_code, salary, ...).
>>
>> Looking further ahead, catalog-owned metadata could also open the door to
>> things like branch or version-level permissions. I don't want to sidetrack
>> this thread with that, but it could be worth exploring later if we go this
>> way.
>>
>> Best,
>> Xander
>>
>>
>> On Tue, 1Dec 2026 at 12:33, Kevin Liu via dev <[email protected]>
>> wrote:
>>
>>> Hi everyone,
>>>
>>> I want to continue the discussion on making the `metadata.json` file in
>>> storage optional and relying on the REST catalog response instead. This has
>>> come up in a few past threads [1][2][3], and it recently came up again in
>>> the `loadTableV2` discussion in PR #17642 [4], so I think it warrants its
>>> own discussion thread.
>>>
>>> My main motivation is speeding up streaming and high-frequency writes,
>>> especially combined with v4 single-file commits. Today the commit protocol
>>> requires writing a new `metadata.json` file to object storage on every
>>> commit. Making it optional removes that extra storage I/O from the commit
>>> path. There are other benefits too, like cheaper commit retries (on a
>>> conflict, the catalog no longer has to write and discard a `metadata.json`
>>> file), avoiding plaintext metadata files for encrypted tables, and letting
>>> catalogs control access to table metadata (for example, redacting sensitive
>>> metadata) instead of clients reading it directly from storage.
>>>
>>> The main concern from past discussions is interoperability and catalog
>>> lock-in. The `unregisterTable` endpoint [5] helps address migration since a
>>> catalog can materialize and return the final `metadata.json` and
>>> `metadata-location` when moving a table to another catalog. One gap is that
>>> `unregisterTable` is destructive, so it doesn't cover non-destructive
>>> export for backup, DR, or debugging. `loadTable?snapshots=all` covers part
>>> of that, and we could also consider a dedicated export endpoint.
>>>
>>> If we move forward, here is the work I think we need to get there:
>>>
>>> 1. Update the table spec [6] so commits no longer require writing a new
>>> `metadata.json` file to storage on every commit, as long as the catalog
>>> guarantees atomic commits and a linear history.
>>> 2. Update the REST spec to clarify optional `metadata-location` across
>>> `LoadTableResult` [7] (currently optional for staged creates) and
>>> `CommitTableResponse` [8] (currently required), and clarify the portability
>>> contract for `unregisterTable` and `loadTable?snapshots=all`.
>>> 3. Remove hard dependencies on `metadata.json` in storage across clients
>>> and engines, such as `RESTTableOperations`, `SerializableTable`,
>>> `StaticTableOperations`, static metadata tables, and maintenance actions
>>> (Yufei started tracking these in [9]).
>>>
>>> I'd like to use this thread to build consensus on making `metadata.json`
>>> optional in storage. One open question is scope: should this apply to v4
>>> tables only, or to any table loaded through `loadTableV2`? Existing clients
>>> expect `metadata-location` in `CommitTableResponse`, which is part of why
>>> scope matters.
>>>
>>> Let me know what you think!
>>>
>>> Best,
>>> Kevin Liu
>>>
>>> [1] https://lists.apache.org/thread/clfpm1spd0k6rrvwm3nbt1cs3so7tsjt
>>> [2] https://lists.apache.org/thread/l1onvv5p5cq2vtql9g8w5fbxc1hhd65l
>>> [3] https://lists.apache.org/thread/5g6zfo0yyw8k5lzdd266sb270rxh7tnn
>>> [4] https://github.com/apache/iceberg/pull/17642
>>> [5]
>>> https://github.com/apache/iceberg/blob/121c73fcdcdc7d851ce65634e92fd2a5dc6c3254/open-api/rest-catalog-open-api.yaml#L1374-L1388
>>> [6]
>>> https://github.com/apache/iceberg/blob/121c73fcdcdc7d851ce65634e92fd2a5dc6c3254/format/spec.md?plain=1#L1476-L1480
>>> [7]
>>> https://github.com/apache/iceberg/blob/121c73fcdcdc7d851ce65634e92fd2a5dc6c3254/open-api/rest-catalog-open-api.yaml#L4280-L4336
>>> [8]
>>> https://github.com/apache/iceberg/blob/121c73fcdcdc7d851ce65634e92fd2a5dc6c3254/open-api/rest-catalog-open-api.yaml#L5367-L5376
>>> [9]
>>> https://docs.google.com/document/d/17PBhJ0IBxHxMKvCW6CstGOp7cZnboMDdpO6BCPO2kmA/edit?usp=sharing
>>>
>>

Reply via email to