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/01 08:29:26 UTC

[GitHub] [pulsar] liangyepianzhou opened a new pull request, #15875: [fix][txn]Fix transasction ack batch message

liangyepianzhou opened a new pull request, #15875:
URL: https://github.com/apache/pulsar/pull/15875

   Fixes https://github.com/apache/pulsar/issues/15832
   
   ### Motivation
   Transaction needs batch size to help determine whether the batch message is in the pending ack state.
   
   ### Modifications
   Returns the batch size of messageID directly.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
     
   - [x] `doc-not-needed` 
   (Please explain why)
     
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)


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


[GitHub] [pulsar] congbobo184 merged pull request #15875: [fix][txn]Fix transasction ack batch message

Posted by GitBox <gi...@apache.org>.
congbobo184 merged PR #15875:
URL: https://github.com/apache/pulsar/pull/15875


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


[GitHub] [pulsar] liangyepianzhou commented on pull request #15875: [fix][txn]Fix transasction ack batch message

Posted by GitBox <gi...@apache.org>.
liangyepianzhou commented on PR #15875:
URL: https://github.com/apache/pulsar/pull/15875#issuecomment-1147338271

   /pulsarbot run-failure-checks


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


[GitHub] [pulsar] liangyepianzhou commented on pull request #15875: [fix][txn]Fix transasction ack batch message

Posted by GitBox <gi...@apache.org>.
liangyepianzhou commented on PR #15875:
URL: https://github.com/apache/pulsar/pull/15875#issuecomment-1147412084

   /pulsarbot run-failure-checks


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


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

Posted by GitBox <gi...@apache.org>.
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