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/06/21 03:55:46 UTC

[GitHub] [pulsar-client-go] merlimat opened a new pull request #292: Used pooled buffering for compression and batch serialization

merlimat opened a new pull request #292:
URL: https://github.com/apache/pulsar-client-go/pull/292


   ### Motivation
   
    * Used pooled buffers when serializing a batch of messages
    * Perform in-place compression into the batch buffer


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



[GitHub] [pulsar-client-go] merlimat merged pull request #292: Used pooled buffering for compression and batch serialization

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #292:
URL: https://github.com/apache/pulsar-client-go/pull/292


   


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



[GitHub] [pulsar-client-go] merlimat commented on a change in pull request #292: Used pooled buffering for compression and batch serialization

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #292:
URL: https://github.com/apache/pulsar-client-go/pull/292#discussion_r443222534



##########
File path: pulsar/consumer_partition.go
##########
@@ -859,7 +859,7 @@ func (pc *partitionConsumer) Decompress(msgMeta *pb.MessageMetadata, payload int
 		pc.compressionProviders[msgMeta.GetCompression()] = provider
 	}
 
-	uncompressed, err := provider.Decompress(payload.ReadableSlice(), int(msgMeta.GetUncompressedSize()))
+	uncompressed, err := provider.Decompress(nil, payload.ReadableSlice(), int(msgMeta.GetUncompressedSize()))

Review comment:
       It’s an established convention in Go APIs. For example all the compression implementations are using that. 




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



[GitHub] [pulsar-client-go] aahmed-se commented on a change in pull request #292: Used pooled buffering for compression and batch serialization

Posted by GitBox <gi...@apache.org>.
aahmed-se commented on a change in pull request #292:
URL: https://github.com/apache/pulsar-client-go/pull/292#discussion_r443209190



##########
File path: pulsar/consumer_partition.go
##########
@@ -859,7 +859,7 @@ func (pc *partitionConsumer) Decompress(msgMeta *pb.MessageMetadata, payload int
 		pc.compressionProviders[msgMeta.GetCompression()] = provider
 	}
 
-	uncompressed, err := provider.Decompress(payload.ReadableSlice(), int(msgMeta.GetUncompressedSize()))
+	uncompressed, err := provider.Decompress(nil, payload.ReadableSlice(), int(msgMeta.GetUncompressedSize()))

Review comment:
       have a method definition that does not require nil as a parameter.




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