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 2022/06/02 09:24:24 UTC

[GitHub] [pulsar] congbobo184 commented on a diff in pull request #15875: [fix][txn]Fix transasction ack batch message

congbobo184 commented on code in PR #15875:
URL: https://github.com/apache/pulsar/pull/15875#discussion_r887752139


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java:
##########
@@ -478,7 +478,7 @@ private CompletableFuture<Void> individualAckWithTransaction(CommandAck ack) {
             MessageIdData msgId = ack.getMessageIdAt(i);
             PositionImpl position;
             long ackedCount = 0;
-            long batchSize = getBatchSize(msgId);
+            long batchSize = msgId.getBatchSize();

Review Comment:
   don't change this method; if this message is not a batch message, the batchSize will set it to -1. Batch size is used to change unAckMessageCount, is it should be 1, not -1, and not 0. so I only suggest change positionsAcked not this batchSize



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