BewareMyPower opened a new pull request, #1494: URL: https://github.com/apache/pulsar-client-go/pull/1494
`c.consumers` can be updated by `internalTopicSubscribeToPartitions`, so we must access `c.consumers` when holding a lock. However, many code places don't follow the implicit requirement, so nil pointer dereference could happen. This PR replaces the combination of `c.checkMsgIDPartition(msgID)` and `c.consumers[msgID]` with a wrapped method `findPartitionConsumer`, which retrieves the consumer with lock held. Specifically, for `Seek`, add an unsafe version (i.e. no lock acquired) because the lock has been acquired to check `if len(c.consumers) > 1` before. -- 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]
