rdhabalia commented on a change in pull request #561: Fix: CPP release 
baseCommand after serializing it
URL: https://github.com/apache/incubator-pulsar/pull/561#discussion_r127107808
 
 

 ##########
 File path: pulsar-client-cpp/lib/ClientConnection.cc
 ##########
 @@ -941,13 +941,15 @@ ClientConnection::newConsumerStats(uint64_t consumerId, 
uint64_t requestId) {
 void ClientConnection::newTopicLookup(const std::string& destinationName, bool 
authoritative,
                                       const uint64_t requestId,
                                       LookupDataResultPromisePtr promise) {
+    Lock lock(mutex_);
 
 Review comment:
   but that's fine..right? as far as specific command get back 
`cmd.mutable_X()` is thread-safe, there should not be any issue. 
   in case of lookup: if serializing lookup data  is thread-safe, it will not 
affect any lookup or other cmd serialization.
   right?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to