lordcheng10 opened a new pull request #13798:
URL: https://github.com/apache/pulsar/pull/13798
### Motivation
If the consumer is added into addConsumerIntoRecentlyJoinedConsumers,
addConsumer shoud be called after removeing from
addConsumerIntoRecentlyJoinedConsumers.
When the message pushed to the consumer is to be pushed again, it has
already been added to the consumer selector, which may cause some keys to be
hashed to the newly added consumer, but at this time, because these entry
positions are smaller than those recorded in recentlyJoinedConsumers
readPositionWhenJoining, so the entry is never sent.
So in order to ensure the order, the correct approach should be to move the
consumer from the recentlyJoinedConsumers to the consumer selector only after
the read position is moved to readPositionWhenJoining.
### Documentation
Check the box below or label this PR directly (if you have committer
privilege).
Need to update docs?
- [ ] `doc-required`
(If you need help on updating docs, create a doc issue)
- [x] `no-need-doc`
(Please explain why)
- [ ] `doc`
(If this PR contains doc changes)
--
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]