Vanlightly commented on a change in pull request #11570:
URL: https://github.com/apache/pulsar/pull/11570#discussion_r683686746
##########
File path: pulsar-client-cpp/lib/PartitionedProducerImpl.cc
##########
@@ -379,8 +418,8 @@ bool PartitionedProducerImpl::isConnected() const {
Lock producersLock(producersMutex_);
const auto producers = producers_;
producersLock.unlock();
- for (const auto& producer : producers_) {
- if (!producer->isConnected()) {
+ for (const auto& producer : producers) {
Review comment:
Yes. The question is what people do with this method. Is it an indicator
of a problem? Without lazy producers, false means we were once connected but
now aren't and so can be considered a transient problem. But with lazy
producers, false may mean we've not even tried, so false does not mean
anything. So I decided to return true to signal absence of a problem.
Definitely interested to hear opinions on that.
--
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]