Guy, I think you're right. The transaction should retry and update the latest metadata.json rather than blindly replacing it. Feel free to ping me for a review.
On Wed, Aug 6, 2025 at 4:19 AM Guy Gadon <g...@ryft.io.invalid> wrote: > Hey all, > > Following up on the issue originally opened in > https://github.com/apache/iceberg/issues/13651. > The current behavior, which ignores any potential conflicts, can be very > dangerous with metadata changes. > This behavior can cause many potential issues - it can "revive" snapshots > that were expired (like described in the issue above). It can also override > changes in table properties, schema, sorting, etc. > > I think we should consider changing the REPLACE TABLE behavior, and allow > conflicts to happen, at least in the metadata.json level. Ignoring > data-level conflicts still makes sense, so the fix can include > only rebuilding the metadata to resolve the conflicts. > > What are your thoughts about this? > > Best, > Guy >