dferstay commented on a change in pull request #689:
URL: https://github.com/apache/pulsar-client-go/pull/689#discussion_r775107621



##########
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:
       @wolfstudy , I've renamed the variables in this method for additional 
clarity.




-- 
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]


Reply via email to