poorbarcode opened a new pull request, #20407:
URL: https://github.com/apache/pulsar/pull/20407

   ### Motivation
   
   <strong>Background-1</strong>: After all consumers are removed, the 
Dispatcher will call `cursor.rewind` and reset all attributes in memory, making 
the Dispatcher like a new Dispatcher.
   
   <strong>Background-2</strong>: there have a variable 
`recentlyJoinedConsumers` records the read position of the cursor when a new 
consumer registers.
   
   If there has an in-flight reading, Dispatcher does not call `cursor.rewind` 
immediately but waits for the in-flight reading complete, it makes the 
`recentJoinedPosition` of new consumers in the wrong position.
   
   ### Modifications
   
   After `rewind`, clear `recentJoinedPosition`  
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository:
   - x
   


-- 
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]

Reply via email to