pulsar
pulsar copied to clipboard
[improve][pip] PIP-386: Add resetIncludeHead in CommandSubscribe for startMessageIdInclusive implementation
Motivation
This pip is intended to fix issue https://github.com/apache/pulsar/issues/23239.
In the previous implementation of the method startMessageIdInclusive (https://github.com/apache/pulsar/pull/4331), we added startMessageIdInclusive() to support include current position of reset on ReaderBuilder.
However, the condition if (((BatchMessageIdImpl) msgId).getBatchIndex() >= 0) in PersistentTopic#getNonDurableSubscription was directly removed.
When we use the NonDurableSubscription, this caused the entryId to decrease by 1 for non-batch messages,
resulting in wrong msgBackLog after topic unload for non-durable subscription.
Documentation
- [ ]
doc - [ ]
doc-required - [x]
doc-not-needed - [ ]
doc-complete
Matching PR in forked repository
PR in forked repository: