shibd opened a new pull request, #25727: URL: https://github.com/apache/pulsar/pull/25727
### Motivation When a subscription name contains `/` (e.g. a Pulsar Function's fully-qualified name like `tenant/namespace/function`), opening the transaction pending-ack store fails with: **Root cause:** `MLPendingAckStore.getTransactionPendingAckStoreSuffix()` appends the raw subscription name to the topic name string. When the result is passed to `TopicName.get()`, the extra `/` characters produce four path segments, which `TopicName` misidentifies as a deprecated V1 (cluster-scoped) name and throws synchronously. ### Changes - **`MLPendingAckStore.getTransactionPendingAckStoreSuffix()`**: URL-encode the subscription name with `Codec.encode()` before appending it. `TopicName` always `Codec.decode()`s the local-name on parse and re-encodes it on output (`getPersistenceNamingEncoding()`), so there is no double-encoding and the managed-ledger path is correct. - **`PersistentTopic.unsubscribe()`**: Remove the pre-emptive `Codec.encode()` call — encoding is now done centrally in `getTransactionPendingAckStoreSuffix()`. - **Tests**: Two new assertions — one verifying slash-containing subscription names work correctly, one as a regression guard for normal names. ### Verifying this change All tests passed ### Does this pull request potentially affect one of the following parts: <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> *If the box was checked, please highlight the changes* - [ ] Dependencies (add or upgrade a dependency) - [ ] The public API - [ ] The schema - [ ] The default values of configurations - [ ] The threading model - [ ] The binary protocol - [ ] The REST endpoints - [ ] The admin CLI options - [ ] The metrics - [ ] Anything that affects deployment -- 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]
