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/11/08 11:49:25 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #12403: [PIP 107][Client] Introduce chunk message ID

codelipenghui commented on a change in pull request #12403:
URL: https://github.com/apache/pulsar/pull/12403#discussion_r744644378



##########
File path: pulsar-common/src/main/proto/PulsarApi.proto
##########
@@ -61,6 +61,9 @@ message MessageIdData {
     optional int32 batch_index = 4 [default = -1];
     repeated int64 ack_set = 5;
     optional int32 batch_size = 6;
+
+    // For the chunk message id, we need to specify the first chunk message id.
+    optional MessageIdData first_chunk_message_id = 7;

Review comment:
       Do we need this change? The chunk message ID is a new type at the client-side, looks like do not need to pass it to the server-side.

##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -461,10 +462,11 @@ public void sendAsync(Message<?> message, SendCallback callback) {
                     sequenceId = msgMetadata.getSequenceId();
                 }
                 String uuid = totalChunks > 1 ? String.format("%s-%d", producerName, sequenceId) : null;
+                ChunkedMessageCtx chunkedMessageCtx = ChunkedMessageCtx.RECYCLER.get();

Review comment:
       Only create the ctx if chunk message enabled?

##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -461,10 +462,11 @@ public void sendAsync(Message<?> message, SendCallback callback) {
                     sequenceId = msgMetadata.getSequenceId();
                 }
                 String uuid = totalChunks > 1 ? String.format("%s-%d", producerName, sequenceId) : null;
+                ChunkedMessageCtx chunkedMessageCtx = ChunkedMessageCtx.RECYCLER.get();

Review comment:
       It's better to avoid exposing the RECYCLER directly, the recycler should be an internal concept of the ChunkedMessageCtx.




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