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/08/15 05:35:44 UTC

[GitHub] [pulsar] gaoran10 commented on a diff in pull request #17016: [fix][txn] fix ack with txn compute ackedCount error

gaoran10 commented on code in PR #17016:
URL: https://github.com/apache/pulsar/pull/17016#discussion_r945435370


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java:
##########
@@ -523,25 +523,31 @@ private CompletableFuture<Long> individualAckWithTransaction(CommandAck ack) {
         LongAdder totalAckCount = new LongAdder();
         for (int i = 0; i < ack.getMessageIdsCount(); i++) {
             MessageIdData msgId = ack.getMessageIdAt(i);
-            PositionImpl position;
+            PositionImpl position = PositionImpl.get(msgId.getLedgerId(), msgId.getEntryId());
+            // acked count at least one
             long ackedCount = 0;
-            long batchSize = getBatchSize(msgId);
+            long batchSize = 0;

Review Comment:
   Ok, If not batch message, the batch size should be 0, right?



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