Skip to content

Core: Send snapshot events and commit reports after a transaction commits - #18591

Open
binarybrain-009 wants to merge 1 commit into
apache:mainfrom
binarybrain-009:core-transaction-snapshot-events
Open

binarybrain-009 wants to merge 1 commit into
apache:mainfrom
binarybrain-009:core-transaction-snapshot-events

Conversation

@binarybrain-009

Copy link
Copy Markdown

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

…mits

Snapshot producers in a transaction notified listeners and reported commit
metrics when their change was only staged, so events were sent for snapshots
that might never be committed, and sent again when a retried transaction
re-applied its updates. The transaction now sends each producer's latest
event once the transaction has committed.

Closes apache#7278
@github-actions github-actions Bot added the core label Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CreateSnapshotEvent / CommitReport are sent prematurely when using a Transaction

1 participant