Skip to content

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

Open
merlimat wants to merge 1 commit intoapache:masterfrom
merlimat:pip-471-metadata-driven-transactions
Open

[feat] PIP-471: Metadata-Driven Transactions for Scalable Topics#25693
merlimat wants to merge 1 commit intoapache: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
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.

1 participant