codelipenghui opened a new pull request #5571: Add epoch for connection handler 
to handle create producer timeout.
URL: https://github.com/apache/pulsar/pull/5571
 
 
   Fixes #5535
   
   ### Motivation
   
   Currently, if user create producer timeout, the connection handler of 
producer will reconnect to the broker later, but if in broker already done the 
previous create producer request, the reconnection will failed with "producer 
with name xxx is already connected".
   
   So this PR will introduce epoch for connection handler and add a field named 
`isGeneratedName` for producer to handle above problem.
   
   This PR only handle the generated producer name scenario, so many users 
occur errors such like 
   #5535, so we need to fix the generated producer name scenario first.
   
   For the scenario of user specified producer name, we can discuss later and 
find a simple approach to handle it, i left my idea here: using producer id and 
producer name as the identity of producer, producer name used for EO producer 
and producer id can used by the producer reconnect, but this approach depends 
on globally unique producer id generator.
   
   ### Modifications
   
   If the producer with generated producer name and epoch of the producer is 
bigger than the exists producer, the new producer will overwrite the old 
producer, so the `reconnect producer` will create succeed.
   
   ### Verifying this change
   
   Add unit tests to simulate producer timeout and reconnection
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (no)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to