[improve][broker] PIP-473: group all txn metadata paths under /txn/#25792
Merged
Conversation
P2.5 — path-prefix cleanup. Moves the four transaction metadata prefixes
shipped in P2 (and used by P3 + P4) under a single /txn/ root, grouped by
purpose:
/txn/<txnId> → /txn/id/<txnId>
/txn-op/... → /txn/op/...
/txn-segment-events/... → /txn/segment-events/...
/txn-subscription-events/... → /txn/subscription-events/...
Headers move to /txn/id/<txnId> so getChildren("/txn") returns the four
purpose-buckets cleanly, not a mix of txnIds and sibling prefixes.
No behaviour change. All path construction already goes through TxnPaths
helpers, so the rename is contained to the constants in TxnPaths.java plus
the corresponding javadoc/comment text in the records and the participant
code. P2/P3/P4 unit tests all pass unchanged.
The new /txn/ root also makes room for upcoming P3.5 additions like
/txn/segment-state/<segment>/... per the visibility-state design note,
without further restructuring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P2.5 — path-prefix cleanup for PIP-473 metadata. Moves the four transaction-metadata prefixes shipped in P2 (#25754) and used by P3 / P4 (#25768, #25772) under a single
/txn/root, grouped by purpose:/txn/<txnId>/txn/id/<txnId>/txn-op/.../txn/op/.../txn-segment-events/.../txn/segment-events/.../txn-subscription-events/.../txn/subscription-events/...Headers move to
/txn/id/<txnId>sogetChildren("/txn")returns the four purpose-buckets cleanly, not a mix of txnIds and sibling prefixes. The new/txn/root also leaves room for upcoming P3.5 additions like/txn/segment-state/<segment>/...(per the visibility-state design note) without further restructuring.No behaviour change. The new TC and TB/PendingAckStore providers all remain disabled by default — same path layout is used by exactly the same code, just under different names.
Test plan
TxnPathshelpers, so the rename is contained to the constants inTxnPaths.javaplus the corresponding javadoc/comment text in the records and the participant code. Audit for hardcoded paths inpulsar-broker/src/mainandpulsar-broker/src/testcame up clean.pulsar-broker:test --tests TxnMetadataStoreTest— 7 cases pass.pulsar-broker:test --tests MetadataTransactionBufferTest— 7 cases pass.pulsar-broker:test --tests MetadataPendingAckStoreTest— 6 cases pass.pulsar-broker:test --tests DispatchingTransactionBufferProviderTest— 2 cases pass.pulsar-broker:test --tests DispatchingTransactionPendingAckStoreProviderTest— 2 cases pass.pulsar-broker:test --tests TxnIdsTest— 7 cases pass.pulsar-broker.