merlimat opened a new pull request, #25754: URL: https://github.com/apache/pulsar/pull/25754
## Summary Foundation data layer for [PIP-473](https://github.com/apache/pulsar/issues/...) (metadata-driven transactions). Introduces typed records + path/index constants + a `TxnMetadataStore` façade over `MetadataStore`, ready for the v5 TC to plug into in a follow-up. - New records under `pulsar-broker/.../transaction/metadata/`: - `TxnHeader` — header at `/txn/<txnId>`, the CAS linearization point for `endTxn` - `TxnOp` — op-log entry written under `/txn-op/<txnId>` with `SequenceKeysDeltas` - `TxnEvent` — per-segment / per-(segment, sub) notification event - `Versioned<T>` — `(value, version)` pair returned from reads so callers can CAS - `TxnState`, `TxnOpKind` — Jackson-friendly enums (serialized by name) - `TxnPaths` — path templates, index names, key formatters - `TxnMetadataStore` façade — header CRUD with CAS, op append with kind-specific secondary indexes, deadline / final-state range queries (via `scanByIndex`), and segment / subscription event publish + subscribe (via `subscribeSequence`) - Bundled metadata-layer fix: the `__seq_counter__` sidecar that backs `SequenceKeysDeltas` on non-native stores was leaking through `scanChildren` and the `scanByIndex` fallback. Filter it out in `AbstractMetadataStore`'s defaults plus the Memory and RocksDB native overrides. Oxia uses native sequence keys (no sidecar) and is unaffected. No runtime path consumes this yet — the v5 TC PR will wire it up. ## Test plan - [x] `pulsar-broker:test --tests TxnMetadataStoreTest` — 7 tests on Memory: header CAS lifecycle, write/ack op append + index scan, deadline range scan (filters terminal + out-of-range), final-state range scan, segment + subscription event publish + subscribe - [x] `pulsar-metadata:test --tests MetadataStoreScanChildrenTest` — added `skipsSequenceCounterSidecars` across ZooKeeper / Memory / RocksDB / Oxia / MockZooKeeper - [x] `pulsar-metadata:test --tests SequenceKeysTest` + `MetadataStoreSecondaryIndexTest` — pre-existing suites still green after the abstract-layer change - [x] Checkstyle clean on `pulsar-broker` + `pulsar-metadata` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
