merlimat commented on a change in pull request #8685:
URL: https://github.com/apache/pulsar/pull/8685#discussion_r530524541
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -451,7 +554,44 @@ private boolean isUserProvidedProducerName(Producer
producer){
return producer.isUserProvidedProducerName() &&
!producer.getProducerName().startsWith(replicatorPrefix);
}
- protected abstract void handleProducerRemoved(Producer producer);
+
+ @Override
+ public void removeProducer(Producer producer) {
+ checkArgument(producer.getTopic() == this);
+
+ if (producers.remove(producer.getProducerName(), producer)) {
+ handleProducerRemoved(producer);
Review comment:
No lock needed there so far. Other changes are needed for
`WaitForExclusive`, it's not implemented in this PR
----------------------------------------------------------------
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]