Kurtiscwright opened a new pull request, #16975:
URL: https://github.com/apache/iceberg/pull/16975

   Fixes #16232 
   
   When a concurrent commit lands after a replace transaction is staged,
   commitReplaceTransaction advanced base to the refreshed metadata to satisfy 
the
   optimistic lock but committed the stale staged metadata. This dropped the
   concurrent commit's snapshots from history and reused its sequence number,
   violating sequence-number monotonicity. A replace is last-writer-wins on the
   current schema, spec, and data, but it is not a drop-and-recreate: the table
   must keep its history.
   
   Rebuild the replacement on the refreshed base and replay the staged updates 
so
   the concurrent commit's history is preserved and the replacement snapshot's
   sequence number is re-derived from the refreshed base. Add
   TableMetadata.buildReplacementPreservingIds, which keeps the staged schema's
   field IDs instead of re-deriving them by name, so a concurrent schema change
   cannot shift the IDs the staged data files were written against.
   
   Add tests covering the rebase, history preservation, and field-id stability.
   Update the two server-side conflict tests in CatalogTests, which previously
   asserted a spurious last-assigned-id requirement failure, to assert the 
replace
   succeeds as last-writer-wins.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to