Skip to content

[feat] PIP-473: Metadata-Driven Transactions for Scalable Topics#25693

Merged
merlimat merged 3 commits into
apache:masterfrom
merlimat:pip-471-metadata-driven-transactions
May 12, 2026
Merged

[feat] PIP-473: Metadata-Driven Transactions for Scalable Topics#25693
merlimat merged 3 commits into
apache:masterfrom
merlimat:pip-471-metadata-driven-transactions

Conversation

@merlimat
Copy link
Copy Markdown
Contributor

@merlimat merlimat commented May 6, 2026

Summary

Sub-PIP of PIP-460: Scalable Topics.

Proposes a transaction model for scalable topics that replaces the in-stream commit/abort marker mechanism with metadata-store-backed state, so transactions compose correctly with the segment lifecycle (splits, merges, sealed segments).

The shape of the change:

  • MetadataTransactionBuffer — new TransactionBuffer implementation for segment:// topics. Writes nothing to the topic's data stream; transactional state lives as records and secondary indexes in the metadata store.
  • MetadataPendingAckStore — new PendingAckStore implementation for segment:// subscriptions. No sibling pending-ack topic.
  • Transaction Coordinator V5 — parallel coordinator selected by v5 clients. Single CAS per end-txn; no system-topic log, no log compaction, no cold-start replay. Participants observe state transitions via metadata-store header watches — no broker-to-broker RPCs.
  • MetadataStore extensions — surface partition-key co-location, sequential keys, and secondary indexes with range-watch. Default backend (Oxia) maps to native primitives; ZooKeeper and others can implement them sub-optimally without affecting correctness.

Existing persistent:// topic behavior is unchanged. v4 transactions keep their current implementation byte-for-byte.

The PIP is self-contained — full data model, end-to-end flows (publish, end-txn, dispatch, recovery, GC), backward-compat, and rejected alternatives are in the document.

Test plan

  • Mailing list discussion
  • Mailing list vote

Sub-PIP of PIP-460 (Scalable Topics).

Defines transactional support for scalable topics by replacing the
in-stream commit/abort marker model with metadata-store-backed
state. Adds parallel implementations of TransactionBuffer,
PendingAckStore, and Transaction Coordinator that write nothing
to any data stream, so sealed segments (split/merge) no longer
strand in-flight transactions. Reuses dispatcher, client API, and
TC wire commands; legacy in-stream-marker components remain
unchanged for persistent:// topics.
@github-actions github-actions Bot added the PIP label May 6, 2026
@merlimat merlimat changed the title [PIP-471] Metadata-Driven Transactions for Scalable Topics [feat] PIP-471: Metadata-Driven Transactions for Scalable Topics May 6, 2026
@lhotari lhotari changed the title [feat] PIP-471: Metadata-Driven Transactions for Scalable Topics [feat] PIP-473: Metadata-Driven Transactions for Scalable Topics May 6, 2026
Comment thread pip/pip-471.md Outdated
merlimat and others added 2 commits May 6, 2026 12:39
Co-authored-by: Lari Hotari <lhotari@users.noreply.github.com>
Copy link
Copy Markdown
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some review comments and questions.

Comment thread pip/pip-473.md
Comment thread pip/pip-473.md
Comment thread pip/pip-473.md
Comment thread pip/pip-473.md
Comment thread pip/pip-471.md
Comment thread pip/pip-473.md
Copy link
Copy Markdown
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please check the review comments and mark them resolved.

@merlimat merlimat merged commit 1a97dd2 into apache:master May 12, 2026
13 checks passed
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.

2 participants