merlimat commented on issue #561: Fix: CPP release baseCommand after serializing it URL: https://github.com/apache/incubator-pulsar/pull/561#issuecomment-314934970 > cmd.mutable_CMD always returns the same object reference which will not be thread-safe if multiple thread calls on same BaseCommand cmd. as you can see in previous comment updating num_message doesn't get reset/destroy for subsequent call. Now, lookup call doesn't take lock before using BaseCommand.mutable_lookuptopic, therefore, concurrent lookup thread can update the value of this reference which is not thread-safe. One other option would be to have a static instance of the BaseCommand for the lookup purposes, and always use the same instance, protected by a mutex. ---------------------------------------------------------------- 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
