Jim-Lambert-Bose opened a new issue #120: Data race: type connection_pool.go GetConnection() is not concurrent safe URL: https://github.com/apache/pulsar-client-go/issues/120 Expected behavior Internal `func (p *connectionPool) GetConnection(logicalAddr *url.URL, physicalAddr *url.URL) (Connection, error)` should be concurrent safe. It reaches into the connection type and reads attrribs protected by a mutex without locking/unlocking Actual behavior Current implementation allows a race condition since there is no call to lock/unlock the sync.Mutex in the connection object while reading its private attribs https://github.com/apache/pulsar-client-go/blob/dfc17abd753ac2e488021aede74433e681b5df58/pulsar/internal/connection_pool.go#L56 Steps to reproduce run some tests using the race detector. I'll submit a PR for this in a few minutes.
---------------------------------------------------------------- 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] With regards, Apache Git Services
