poorbarcode commented on PR #15051:
URL: https://github.com/apache/pulsar/pull/15051#issuecomment-1092471076

   > >
   
   
   
   > > > @poorbarcode I don't think that this PR prevents duplicated consumers. 
Could you explain how it achieves that?
   > > 
   > > 
   > > @lhotari @RobertIndie
   > > This PR fixed that : When things go wrong with consumer operations, 
duplicated consumers registry.
   > > You can reproduce the problem like this (The code is in the attachment):
   > 
   > I'm sorry I didn't explain clearly what I meant. Please explain how this 
PR prevents adding duplicate consumers. I don't see a chance in behavior for 
that particular detail. I do acknowledge that this PR makes sense to fix a race 
where the consumer gets removed when it shouldn't. (I explained that in my 
previous comment). However, I don't see how this prevents adding of duplicate 
consumers which appears in #14970.
   
   It's just a guess at one of the possibilities for "Why #14970 problem 
happend".  
   
   Because there has only one instance in `consumerSet`, so two consumer 
instance has same `address` & `consumerId`, so there are only two 
possibilities: 
   
   - Consumer restart use same SocketAddress.
   - One consumer instance execute command-subscribe more times in a short time.
   
   After code-review on the second possibility,  finds possibility-case and 
fixed it. 
   
   Maybe there are other problems that can reproduce #14970 problem


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