Skip to content

[improve][test] PIP-473: extensive v5 transaction tests on scalable topics#25958

Merged
merlimat merged 2 commits into
apache:masterfrom
merlimat:mmerli/pip-473-p6-split-merge
Jun 8, 2026
Merged

[improve][test] PIP-473: extensive v5 transaction tests on scalable topics#25958
merlimat merged 2 commits into
apache:masterfrom
merlimat:mmerli/pip-473-p6-split-merge

Conversation

@merlimat

@merlimat merlimat commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Motivation

P6 (test coverage) hardening for PIP-473 v5 transactions on scalable (topic://) topics. This broadens automated coverage across three layers — single-broker, broker-restart recovery, and a multi-broker docker cluster — and re-enables the split/merge transaction tests that the earlier P5.4 fixes already made pass.

Modifications

  • V5TransactionScalableTest (single-broker unit): multi-segment commit; many concurrent transactions with mixed commit/abort; abort across split and across merge; large transaction; transactional-ack lifecycle (abort → redeliver, then commit → stick); per-subscription isolation of transactional acks; read-committed pinning while a transaction is open.
  • V5TransactionRecoveryTest (single restartable broker): the mock BookKeeper and metadata stores are reused across restartBroker(), so a segment topic reloads cold and exercises MetadataTransactionBuffer / MetadataPendingAckStore recovery — committed data stays visible, aborted data stays filtered, and committed transactional acks are not redelivered.
  • V5ScalableTopicTransactionTest (docker, 2-broker cluster): produce/consume commit+abort, multi-topic atomic commit, consume-transform-produce, broker failover mid-transaction, and commit spanning a split / merge. Registered in pulsar-transaction.xml.
  • Re-enabled V5TransactionTest.testCommitSpansSplit / testCommitSpansMerge and removed their stale "disabled" comments (the gap they described was specific to the old v4 RPC commit model; v5 endTransaction is metadata-event driven).

Verifying this change

This change is a test-only addition and is covered by the new tests. Locally:

  • V5TransactionScalableTest (8 tests) — stable across repeated runs
  • V5TransactionRecoveryTest (3 tests) — stable across repeated runs
  • V5ScalableTopicTransactionTest (6 docker tests) — stable across repeated runs (6/6, incl. failover and split/merge)
  • V5Transactiontest — 7/7 with the split/merge tests re-enabled

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency): no
  • The public API: no
  • The schema: no
  • The default values of configurations: no
  • The threading model: no
  • The binary protocol: no
  • The REST endpoints: no
  • The admin CLI options: no
  • Anything that affects deployment: no

merlimat added 2 commits June 7, 2026 08:26
…opics

Motivation:
P6 hardening for v5 (scalable-topic) transactions. Broaden coverage across
single-broker, broker-restart recovery, and multi-broker docker-cluster
scenarios, and re-enable the split/merge transaction tests that the earlier
P5.4 fixes already made pass.

Modifications:
- V5TransactionScalableTest (single-broker unit): multi-segment commit;
  many concurrent transactions with mixed commit/abort; abort across split
  and across merge; large transaction; transactional-ack lifecycle
  (abort -> redeliver, then commit -> stick); per-subscription isolation of
  transactional acks; read-committed pinning while a transaction is open.
- V5TransactionRecoveryTest (single restartable broker): the mock BookKeeper
  and metadata stores are reused across restartBroker(), so a segment topic
  reloads cold and exercises MetadataTransactionBuffer / MetadataPendingAckStore
  recovery — committed data stays visible, aborted data stays filtered, and
  committed transactional acks are not redelivered.
- V5ScalableTopicTransactionTest (docker, 2-broker cluster): produce/consume
  commit+abort, multi-topic atomic commit, consume-transform-produce, broker
  failover mid-transaction, and commit spanning a split / merge. Registered in
  pulsar-transaction.xml.
- Re-enabled V5TransactionTest.testCommitSpansSplit / testCommitSpansMerge and
  removed their stale "disabled" comments (the gap they described was specific
  to the old v4 RPC commit model; v5 endTransaction is metadata-event driven).

Assisted-by: Claude Code
…against Oxia

Motivation:
The new V5 scalable-topic transaction integration tests run against a
ZooKeeper-backed cluster, which exercises the metadata layout via the
scan-and-filter fallback. Oxia is the backend PIP-473 targets natively
(scanByIndex / subscribeSequence / partition-key / sequence-delta primitives
back the /txn layout directly), so it should also be covered end to end.

Modifications:
- V5ScalableTopicTransactionOnOxiaTest: extends V5ScalableTopicTransactionTest
  and reruns all six scenarios (produce/consume commit+abort, multi-topic
  atomic commit, consume-transform-produce, broker failover mid-transaction,
  commit-spans-split, commit-spans-merge) on a cluster whose metadata store is
  a containerized Oxia (enableOxia=true).
- TcMetadataDiscoveryTestBase: extract the initialize-transaction-coordinator-
  metadata configuration-store connection string into an overridable
  configurationStoreConnectionString() (defaults to the ZooKeeper container;
  the Oxia subclass returns the oxia:// URL). The existing ZK-backed
  TcMetadataDiscoveryTest is unaffected.
- Registered the new class in pulsar-transaction.xml.

Assisted-by: Claude Code
@merlimat
merlimat merged commit 0daa5aa into apache:master Jun 8, 2026
42 checks passed
@lhotari lhotari added this to the 5.0.0-M1 milestone Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants