binarybrain-009 opened a new pull request, #18591:
URL: https://github.com/apache/iceberg/pull/18591

   Snapshot producers created by a transaction notified listeners and reported 
commit metrics from their own `commit()`, which only stages the change. A 
`CreateSnapshotEvent` and `CommitReport` were therefore sent for snapshots that 
might never be committed, and sent again each time a retried transaction 
re-applied its updates. Each producer now keeps the event from its latest 
staged commit, and `commitTransaction()` sends them once the table commit 
succeeds. Changes committed through the multi-table `TableCommit` API never 
call `commitTransaction()`, so they no longer send these notifications. 
`CatalogTests#testCatalogWithCustomMetricsReporter` counted reports from 
uncommitted create/replace transactions, so it now commits them first.
   
   Closes #7278
   
   Test plan: an uncommitted or failed transaction sends no event and a 
committed one does; a retried transaction sends a single report with the 
committed sequence number; create/replace transactions report only after commit 
in every catalog.
   
   ---
   **AI Disclosure**
   - Model: Claude Opus 5.5
   - Platform/Tool: Claude Code
   - Human Oversight: fully reviewed
   - Prompt Summary: Fix #7278 so snapshot events and commit reports from a 
transaction are sent only after the transaction commits; the fix and its tests 
are generated.
   


-- 
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