Vanlightly commented on a change in pull request #11570:
URL: https://github.com/apache/pulsar/pull/11570#discussion_r683557403



##########
File path: pulsar-client-cpp/lib/PartitionedProducerImpl.cc
##########
@@ -161,7 +182,13 @@ void PartitionedProducerImpl::sendAsync(const Message& 
msg, SendCallback callbac
     }
     // find a producer for that partition, index should start from 0
     ProducerImplPtr producer = producers_[partition];
+
+    if (conf_.getLazyStartPartitionedProducers() && !producer->isStarted()) {
+        producer->start();

Review comment:
       It isn't but this code is protected by the producersLock so it can't be 
called twice concurrently.




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