You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/08/26 23:09:44 UTC

[GitHub] [pulsar] merlimat opened a new pull request #11804: Producer getting producer busy is removing existing producer from list

merlimat opened a new pull request #11804:
URL: https://github.com/apache/pulsar/pull/11804


   ### Motivation
   
   When a producer is getting error because of ProducerBusy (existing producer with the same name), it will trigger a producer close operation that will eventually lead to the existing producer getting removed from the topic map (even though that producer is still writing on the topic). 
   
   The problem is the producer close is triggering a removal from the map: 
   https://github.com/apache/pulsar/blob/43ded5927fb78add69196b46c1edc36bde77af0e/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java#L683
   
   Even though we check for producer equality, the `Producer.equals()` is only comparing the producer name, so the old instance gets removed from the map. 
   
   Instead, the equality of producer needs to be based on the connection id (local & remote addresses and unique id), plus the producer id within that connection. 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] hangc0276 merged pull request #11804: Producer getting producer busy is removing existing producer from list

Posted by GitBox <gi...@apache.org>.
hangc0276 merged pull request #11804:
URL: https://github.com/apache/pulsar/pull/11804


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org