You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "liangyepianzhou (via GitHub)" <gi...@apache.org> on 2023/08/10 00:44:29 UTC
[GitHub] [pulsar] liangyepianzhou commented on a diff in pull request #20948: [fix][broker]Fix chunked messages will be filtered by duplicating
liangyepianzhou commented on code in PR #20948:
URL: https://github.com/apache/pulsar/pull/20948#discussion_r1289398905
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java:
##########
@@ -553,9 +555,8 @@ public void sendAsync(Message<?> message, SendCallback callback) {
synchronized (this) {
// Update the message metadata before computing the payload chunk size
// to avoid a large message cannot be split into chunks.
- final long sequenceId = updateMessageMetadataSequenceId(msgMetadata);
- String uuid = totalChunks > 1 ? String.format("%s-%d", producerName, sequenceId) : null;
-
+ final long sequenceId = updateMessageMetadataSequenceId(msgMetadata, chunkId > 0);
+ String uuid = totalChunks > 1 ? String.format("%s-%s", producerName, chunkUUid) : null;
Review Comment:
Yeah, we need to worry about the uuid collision.
So we should sequence ID to generate uuid.
```
String uuid = totalChunks > 1 ? String.format("%s-%s", producerName, sequenceId - chunkId) : null;
```
--
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