You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/24 09:33:18 UTC
[GitHub] [pulsar-client-go] wolfstudy commented on a change in pull request #689: [Partition Consumer] Provide lock-free access to compression providers
wolfstudy commented on a change in pull request #689:
URL: https://github.com/apache/pulsar-client-go/pull/689#discussion_r774949519
##########
File path: pulsar/consumer_partition.go
##########
@@ -1190,19 +1193,26 @@ func getPreviousMessage(mid trackingMessageID) trackingMessageID {
}
func (pc *partitionConsumer) Decompress(msgMeta *pb.MessageMetadata, payload internal.Buffer) (internal.Buffer, error) {
- pc.providersMutex.RLock()
- provider, ok := pc.compressionProviders[msgMeta.GetCompression()]
- pc.providersMutex.RUnlock()
+ v, ok := pc.compressionProviders.Load(msgMeta.GetCompression())
Review comment:
Maybe we can replace `v` with meaningful variable names
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org