void-ptr974 opened a new pull request, #26179:
URL: https://github.com/apache/pulsar/pull/26179
Fixes #26178
### Motivation
When increasing partitions, Pulsar copies durable subscription properties
from
partition-0 to new partitions.
Bucket delayed delivery stores cursor-local snapshot metadata as
`#pulsar.internal.delayed.bucket*`. Copying that state makes a new partition
recover delayed-message indexes that belong to partition-0, which can result
in
incorrect delayed-delivery state and invalid replay attempts.
### Modifications
Filter `#pulsar.internal.*` properties before creating subscriptions on new
partitions. User-defined subscription properties are still copied.
Existing cursor-property and stats exposure is unchanged.
### Verifying this change
- Added partition-expansion coverage for internal cursor properties.
- Added bucket delayed-delivery coverage that activates the new partition's
tracker and verifies it recovers zero delayed messages.
- `./gradlew --no-daemon --console=plain :pulsar-broker:test --tests
org.apache.pulsar.broker.admin.IncrementPartitionsTest --tests
org.apache.pulsar.broker.service.persistent.BucketDelayedDeliveryTest`
- `./gradlew --no-daemon --console=plain :pulsar-broker:checkstyleMain
:pulsar-broker:checkstyleTest`
### Does this pull request potentially affect one of the following parts:
- [ ] 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]