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 2020/05/14 00:34:29 UTC

[GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #247: [Issue 246][compression.Provider] Not sharing compression.Provider among producers and consumers

cckellogg commented on a change in pull request #247:
URL: https://github.com/apache/pulsar-client-go/pull/247#discussion_r424806768



##########
File path: pulsar/consumer_partition.go
##########
@@ -875,6 +868,20 @@ func (pc *partitionConsumer) discardCorruptedMessage(msgID *pb.MessageIdData,
 		})
 }
 
+func (pc *partitionConsumer) getCompressionProvider(compressionType pb.CompressionType) (
+	provider compression.Provider, ok bool) {
+	if pc.compressionProviders == nil {
+		pc.compressionProviders = map[pb.CompressionType]compression.Provider{

Review comment:
       Will each consumer each have their own reference to all compressions providers? If so why not just preallocate when the partition consumer is created?
   




----------------------------------------------------------------
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:
users@infra.apache.org